Skip to content
Snippets Groups Projects
Commit 82100e76 authored by René Heß's avatar René Heß
Browse files

[Bug] Fix delete cache bug

parent 5cf4a496
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,18 @@ class _ConditionDict(dict):
self.tags = tags
def __getitem__(self, i):
# If we do not add these special cases the dictionary will return False
# when we execute the following code:
#
# eval ("True", _ConditionDict(v.tags)
#
# But in this case we want to return True! A normal dictionary would not attempt
# to replace "True" if "True" is not a key. The _ConditionDict obviously has no
# such concerns ;).
if i == "True":
return True
if i == "False":
return False
return i in self.tags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment