Clean context before using it as a key for cache
This commit is contained in:
1 parent
27f67ccfd5
commit
2b866bfe7a
1 file changed
+6
@@ -280,6 +280,12 @@ class Cache(object):
|
||||
return True
|
||||
# Update named arguments with positional argument values
|
||||
kwargs.update(dict(zip(arg_names, args)))
|
||||
if 'context' in kwargs:
|
||||
if isinstance(kwargs['context'], dict):
|
||||
for i in ('_timestamp', '_delete', '_create_records',
|
||||
'_delete_records'):
|
||||
if i in kwargs['context']:
|
||||
del kwargs['context'][i]
|
||||
kwargs = kwargs.items()
|
||||
kwargs.sort()
|
||||
|
||||
|
||||
Reference in new issue
Block a user