From: Mike Bayer Date: Mon, 31 Aug 2009 21:59:45 +0000 (+0000) Subject: doh X-Git-Tag: rel_0_6beta1~308 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fed57bc9dd48fc08bbb845cf434d22770b58a9a1;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git doh --- diff --git a/lib/sqlalchemy/orm/identity.py b/lib/sqlalchemy/orm/identity.py index d0d0a7962e..c668bc5fea 100644 --- a/lib/sqlalchemy/orm/identity.py +++ b/lib/sqlalchemy/orm/identity.py @@ -211,7 +211,7 @@ class StrongInstanceDict(IdentityMap): def add(self, state): if state.key in self: - if dict.__getitem__(self, state.key) is not state: + if attributes.instance_state(dict.__getitem__(self, state.key)) is not state: raise AssertionError("A conflicting state is already present in the identity map for key %r" % (state.key, )) else: dict.__setitem__(self, state.key, state.obj())