diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-04-20 17:38:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-04-20 17:38:03 -0400 |
commit | a3af638e1a95d42075e25e87474663348dcf5c14 (patch) | |
tree | 4549f2261067856a251367d49e97e40d0bb84b2c /lib/sqlalchemy/orm/attributes.py | |
parent | bd61e7a3287079cf742f4df698bfe3628c090522 (diff) | |
download | sqlalchemy-a3af638e1a95d42075e25e87474663348dcf5c14.tar.gz |
- Fixed more regressions caused by NEVER_SET; comparisons
to transient objects with attributes unset would leak NEVER_SET,
and negated_contains_or_equals would do so for any transient
object as the comparison used only the committed value.
Repaired the NEVER_SET cases, fixes #3371, and also made
negated_contains_or_equals() use state_attr_by_column() just
like a non-negated comparison, fixes #3374
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index 41803c8bf..a45c22394 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -619,7 +619,7 @@ class AttributeImpl(object): if self.key in state.committed_state: value = state.committed_state[self.key] - if value is NO_VALUE: + if value in (NO_VALUE, NEVER_SET): return None else: return value |