SidetagOwnerTest: fix none value of tag/fromtag as well

This commit is contained in:
Yuming Zhu 2025-11-10 21:08:20 +08:00 committed by Mike McLean
commit 385f35641a

View file

@ -85,7 +85,9 @@ class SidetagOwnerTest(koji.policy.MatchTest):
for field in fields:
if field not in data:
return False
tag = get_tag(data[field])
tag = data.get(field)
if tag:
tag = get_tag(tag)
if not tag or not is_sidetag_owner(tag, user):
return False
return True