[AIRFLOW-260] Handle case when no version is found

If no version is found, the “.name” attribute can’t be accessed,
causing a crash.
This commit is contained in:
jlowin 2016-06-30 20:24:58 -04:00
Родитель 8f863d7ea7
Коммит 7774c39219
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -524,7 +524,8 @@ def resolve_jira_issue(comment=None, jira_id=None, merge_branches=None):
if versions:
default_fix_versions = map(
lambda x: fix_version_from_branch(x, versions).name, merge_branches)
lambda x: fix_version_from_branch(x, versions), merge_branches)
default_fix_versions = [v.name for v in default_fix_versions if v]
else:
default_fix_versions = []