summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/orm/strategies.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py
index 9197c2397..1bdd18cde 100644
--- a/lib/sqlalchemy/orm/strategies.py
+++ b/lib/sqlalchemy/orm/strategies.py
@@ -515,8 +515,6 @@ class LazyLoader(AbstractRelationshipLoader):
else:
get_attr = instance_mapper._get_state_attr_by_column
- # create a strong reference
- # to state.dict
dict_ = state.dict
if passive is attributes.PASSIVE_NO_FETCH_RELATED:
@@ -527,7 +525,7 @@ class LazyLoader(AbstractRelationshipLoader):
return [
get_attr(
state,
- state.dict,
+ dict_,
self._equated_columns[pk],
passive=attr_passive)
for pk in self.mapper.primary_key