diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-19 11:09:38 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-19 11:09:38 -0400 |
| commit | b9a2b58dd74757184ef94206f09e9db1f536e4cb (patch) | |
| tree | 58dd9631ac97aa1b0d5e335f3f3eab5c7c872625 /lib/sqlalchemy/orm/state.py | |
| parent | fd8dbf8e78981187d091dcc25e63ddfb4e56a5f8 (diff) | |
| download | sqlalchemy-b9a2b58dd74757184ef94206f09e9db1f536e4cb.tar.gz | |
- Fixed bug in mutable extension as well as
:func:`.attributes.flag_modified` where the change event would not be
propagated if the attribute had been reassigned to itself.
fixes #2997
Diffstat (limited to 'lib/sqlalchemy/orm/state.py')
| -rw-r--r-- | lib/sqlalchemy/orm/state.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/state.py b/lib/sqlalchemy/orm/state.py index 9712dd055..fb5db1fc9 100644 --- a/lib/sqlalchemy/orm/state.py +++ b/lib/sqlalchemy/orm/state.py @@ -414,10 +414,10 @@ class InstanceState(interfaces._InspectionAttr): def _instance_dict(self): return None - def _modified_event(self, dict_, attr, previous, collection=False): + def _modified_event(self, dict_, attr, previous, collection=False, force=False): if not attr.send_modified_events: return - if attr.key not in self.committed_state: + if attr.key not in self.committed_state or force: if collection: if previous is NEVER_SET: if attr.key in dict_: |
