Don't fail on missing buildroot tag

Fixes: https://pagure.io/koji/issue/3185
This commit is contained in:
Tomas Kopecek 2021-12-16 14:26:04 +01:00
parent 55a6e06d79
commit dd1843207b

View file

@ -9702,8 +9702,10 @@ def policy_get_build_tags(data, taginfo=False):
tags[None] = None
else:
tinfo = get_buildroot(br_id, strict=True)
tags[tinfo['tag_name']] = get_tag(tinfo['tag_name'], strict=True,
event=tinfo['repo_create_event_id'])
# CG don't need to have buildroots based on tags
if tinfo['tag_name']:
tags[tinfo['tag_name']] = get_tag(tinfo['tag_name'], strict=True,
event=tinfo['repo_create_event_id'])
if taginfo:
tags = tags.values()