Skip to content

Commit

Permalink
Prevent exception due to value not being set
Browse files Browse the repository at this point in the history
In case described, the value is set to None, so it is in the dict. This raised the exception mentionned.
  • Loading branch information
sposs committed Aug 25, 2020
1 parent 8554603 commit e71897c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redminelib/resources/standard.py
Expand Up @@ -567,7 +567,7 @@ def __getattr__(self, attr):
# i.e. project, and it's not used in the resource, there will be
# no value attribute defined, that is why we need to return '' or
# we'll get an exception
if attr == 'value' and attr not in self._decoded_attrs:
if attr == 'value' and not self._decoded_attrs.get(attr, ""):
return ''

return super(CustomField, self).__getattr__(attr)
Expand Down

0 comments on commit e71897c

Please sign in to comment.