summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-01-09 14:16:22 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2017-01-09 14:16:22 -0500
commit51a72503b0279ca71ee6f0454bfd36a4c84d508f (patch)
treee912d80c832d98ff9b5eb8d5ba499b1c15eb7791 /lib/sqlalchemy
parent2b4d028a69270c1c7918281a60280dd0b65963a2 (diff)
downloadsqlalchemy-51a72503b0279ca71ee6f0454bfd36a4c84d508f.tar.gz
Adapt from "localparent" in joinedloader
Fixed bug involving joined eager loading against multiple entities when polymorphic inheritance is also in use which would throw "'NoneType' object has no attribute 'isa'". The issue was introduced by the fix for :ticket:`3611`. Change-Id: I296ecda38c01ec8f69dcd843beaebed6949cecfa Fixes: #3884
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/strategies.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py
index 33feab0dc..273ec1280 100644
--- a/lib/sqlalchemy/orm/strategies.py
+++ b/lib/sqlalchemy/orm/strategies.py
@@ -1368,8 +1368,8 @@ class JoinedLoader(AbstractRelationshipLoader):
# name on it.
efm = inspect(adapter.aliased_class).\
_entity_for_mapper(
- parentmapper
- if parentmapper.isa(self.parent) else self.parent)
+ localparent
+ if localparent.isa(self.parent) else self.parent)
# look for our attribute on the adapted entity, else fall back
# to our straight property