From b69f4b36e0af1a7fbd9522229a81150f6df39c9b Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Dec 21 2021 11:32:04 +0000 Subject: PR#3186: Don't fail on missing buildroot tag Merges #3186 https://pagure.io/koji/pull-request/3186 Fixes: #3185 https://pagure.io/koji/issue/3185 buildtag policy test fails for some CGs --- diff --git a/hub/kojihub.py b/hub/kojihub.py index a9bab9d..d3bfeed 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -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()