]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
doh
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 31 Aug 2009 21:59:45 +0000 (21:59 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 31 Aug 2009 21:59:45 +0000 (21:59 +0000)
lib/sqlalchemy/orm/identity.py

index d0d0a7962eb95683f1ae42d6bb347e1efd54e4ae..c668bc5fea9b3298bbf3d2c821565272f19842db 100644 (file)
@@ -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())