From: Mike Bayer Date: Mon, 5 Apr 2010 17:16:29 +0000 (-0400) Subject: better yet X-Git-Tag: rel_0_6_0~60^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cfdc41c75ce2e2228d71733212bbaca0fe17ce35;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git better yet --- diff --git a/lib/sqlalchemy/orm/dependency.py b/lib/sqlalchemy/orm/dependency.py index 24c3772eea..f2959d1414 100644 --- a/lib/sqlalchemy/orm/dependency.py +++ b/lib/sqlalchemy/orm/dependency.py @@ -334,8 +334,7 @@ class DetectKeySwitch(DependencyProcessor): for state in uowcommit.session.identity_map.all_states(): if not issubclass(state.class_, self.parent.class_): continue - obj = state.obj() - dict_ = attributes.instance_dict(obj) + dict_ = state.dict related = dict_.get(self.key) if related is not None: related_state = attributes.instance_state(dict_[self.key])