Skip to content
Snippets Groups Projects
Commit b0122649 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[common][storage] Fix key search in dictionary

parent 2dad8b57
No related branches found
No related tags found
2 merge requests!2551.4.x,!242Py3 compatibility
......@@ -73,7 +73,7 @@ def get_file_content(instance, attr):
AttributeError: If the field does not exist
"""
if hasattr(instance, '_file_contents') and instance._file_contents.has_key(attr):
if hasattr(instance, '_file_contents') and attr in instance._file_contents:
return instance._file_contents[attr]['value']
f = getattr(instance, attr)
......
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