summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-05-23 11:35:51 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-05-23 11:35:51 -0400
commit174ece15cb167b774d0b48aa2083e13837f99017 (patch)
tree7613a77df19e6908d7030b1e2f3f7bdd2323dbe5 /lib/sqlalchemy/orm/attributes.py
parent999bd50753a46785d8031d080af661f608b867c5 (diff)
downloadsqlalchemy-174ece15cb167b774d0b48aa2083e13837f99017.tar.gz
Include active_history when propagating attribute listeners
Fixed issue where the :paramref:`.AttributeEvents.active_history` flag would not be set for an event listener that propgated to a subclass via the :paramref:`.AttributeEvents.propagate` flag. This bug has been present for the full span of the :class:`.AttributeEvents` system. Fixes: #4695 Change-Id: Ie384f4847f37c267d94b6d56e7538438efc1a54c
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r--lib/sqlalchemy/orm/attributes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index 674c57fea..01f19d991 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -99,6 +99,8 @@ class QueryableAttribute(
for base in manager._bases:
if key in base:
self.dispatch._update(base[key].dispatch)
+ if base[key].dispatch._active_history:
+ self.dispatch._active_history = True
@util.memoized_property
def _supports_population(self):