diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-05-04 19:27:57 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-05-04 19:27:57 -0400 |
| commit | 3757034d2de03f23dabb9456d773e34b8b09edb0 (patch) | |
| tree | 0744209d92d0fda8344087a92dcec9f8ffb2d4c1 /lib/sqlalchemy | |
| parent | a860d12a710e97b03f162336840a8b23a8aaf330 (diff) | |
| download | sqlalchemy-3757034d2de03f23dabb9456d773e34b8b09edb0.tar.gz | |
- [bug] Fixed issue in unit of work
whereby setting a non-None self-referential
many-to-one relationship to None
would fail to persist the change if the
former value was not already loaded.
[ticket:2477].
Diffstat (limited to 'lib/sqlalchemy')
| -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 7625ccead..00d640066 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -627,7 +627,7 @@ class ScalarObjectAttributeImpl(ScalarAttributeImpl): if current is not None: ret = [(instance_state(current), current)] else: - ret = [] + ret = [(None, None)] if self.key in state.committed_state: original = state.committed_state[self.key] |
