From 174ece15cb167b774d0b48aa2083e13837f99017 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 23 May 2019 11:35:51 -0400 Subject: 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 --- lib/sqlalchemy/orm/attributes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy/orm/attributes.py') 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): -- cgit v1.2.1