From 3f9df2b86b4a8d7912d1190aead4aa084daf802c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 22 Aug 2017 18:35:09 -0400 Subject: Handle cache key for option that has no strategy Fixed regression where the use of a :func:`.undefer_group` option in conjunction with a lazy loaded relationship option would cause an attribute error, due to a bug in the SQL cache key generation added in 1.2 as part of :ticket:`3954`. Change-Id: Icd9a34f0b5aa96d6433a2ab9c8d3eaee0006f609 Fixes: #4049 --- lib/sqlalchemy/orm/strategy_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index c47536a02..e07a6b3d0 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -110,7 +110,7 @@ class Load(Generative, MapperOption): serialized.append( ( tuple(serialized_path) + - obj.strategy + + (obj.strategy or ()) + (tuple([ (key, obj.local_opts[key]) for key in sorted(obj.local_opts) -- cgit v1.2.1