diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-04-17 06:55:33 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-04-17 06:55:33 -0400 |
| commit | 30df193cd17ed09570ef897dd139a2201360413c (patch) | |
| tree | dc670444b2036940bdae783792817b363f5e60ac /lib/sqlalchemy | |
| parent | 3cefadd926fdb470bf0672ed10b76685b8d32638 (diff) | |
| download | sqlalchemy-30df193cd17ed09570ef897dd139a2201360413c.tar.gz | |
inline this
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index dee0ec9c7..5ac8ef9ee 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -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) |
