summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/traversals.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql/traversals.py')
-rw-r--r--lib/sqlalchemy/sql/traversals.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/traversals.py b/lib/sqlalchemy/sql/traversals.py
index a24d010cd..2887813ad 100644
--- a/lib/sqlalchemy/sql/traversals.py
+++ b/lib/sqlalchemy/sql/traversals.py
@@ -176,7 +176,9 @@ class HasCacheKey(object):
obj["compile_state_plugin"],
obj["plugin_subject"]._gen_cache_key(
anon_map, bindparams
- ),
+ )
+ if obj["plugin_subject"]
+ else None,
)
elif meth is InternalTraversal.dp_annotations_key:
# obj is here is the _annotations dict. however, we