]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
inline this
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Apr 2010 10:55:33 +0000 (06:55 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Apr 2010 10:55:33 +0000 (06:55 -0400)
lib/sqlalchemy/orm/attributes.py

index dee0ec9c7f0873fdae0eb4523f0b2c1c190c27ef..5ac8ef9ee4733874c69d1e8dc3b10987fc4697d4 100644 (file)
@@ -500,10 +500,9 @@ class MutableScalarAttributeImpl(ScalarAttributeImpl):
             self, state, v)
 
     def check_mutable_modified(self, state, dict_):
-        added, \
-        unchanged, \
-        deleted = self.get_history(state, dict_, passive=PASSIVE_NO_INITIALIZE)
-        return bool(added or deleted)
+        v = dict_.get(self.key, NO_VALUE)
+        a, u, d = History.from_attribute(self, state, v)
+        return bool(a or d)
 
     def get(self, state, dict_, passive=PASSIVE_OFF):
         if self.key not in state.mutable_dict:
@@ -1291,7 +1290,7 @@ class History(tuple):
              and instance_state(c) or None
              for c in self.deleted],
             )
-    
+        
     @classmethod
     def from_attribute(cls, attribute, state, current):
         original = state.committed_state.get(attribute.key, NEVER_SET)