From ca58fa5d9338b6dfaa56b25c5affa369188a7086 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 25 Jun 2014 14:30:25 -0400 Subject: - Fixed bug when the declarative ``__abstract__`` flag was not being distinguished for when it was actually the value ``False``. The ``__abstract__`` flag needs to acutally evaluate to a True value at the level being tested. fixes #3097 --- lib/sqlalchemy/ext/declarative/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/ext/declarative') diff --git a/lib/sqlalchemy/ext/declarative/base.py b/lib/sqlalchemy/ext/declarative/base.py index 0e68faa03..308c09691 100644 --- a/lib/sqlalchemy/ext/declarative/base.py +++ b/lib/sqlalchemy/ext/declarative/base.py @@ -56,7 +56,7 @@ def _as_declarative(cls, classname, dict_): @event.listens_for(mapper, "before_configured") def go(): cls.__declare_first__() - if '__abstract__' in base.__dict__: + if '__abstract__' in base.__dict__ and base.__abstract__: if (base is cls or (base in cls.__bases__ and not _is_declarative_inherits) ): -- cgit v1.2.1