Older versions of python-redmine may raise ResourceAttrError here
instead of returning None, see [1]. Being prepared for an exception
seems like a good idea regardless given how this field recently got
recreated.
[1] https://github.com/maxtepkeev/python-redmine/commit/
0de5689ef5891c1be263c0b3deb8b03966a9c5bd
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
logging.debug("custom_fields: %s", list(issue['custom_fields']))
tags_cf = next(filter(lambda x: x['id'] == CF_TAGS, issue['custom_fields']), None)
-
if tags_cf is None:
tags = ''
else:
- tags = tags_cf.value
+ try:
+ tags = tags_cf.value
+ except ResourceAttrError:
+ tags = None
if tags is None:
tags = ''
else: