]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- dont do a boolean check on the mapped object
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Apr 2013 06:59:58 +0000 (02:59 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Apr 2013 06:59:58 +0000 (02:59 -0400)
lib/sqlalchemy/orm/session.py

index 361ab65e6ec7ddb157cad57ad399485e7de27488..f7a5558f17336cab250a4fb6e780c4b1d54529a5 100644 (file)
@@ -1752,7 +1752,7 @@ class Session(_SessionClassMethods):
                     self.dispatch.before_attach:
                 self.dispatch.before_attach(self, state.obj())
             state.session_id = self.hash_key
-            if state.modified and not state._strong_obj:
+            if state.modified and state._strong_obj is None:
                 state._strong_obj = state.obj()
             if self.dispatch.after_attach:
                 self.dispatch.after_attach(self, state.obj())