PR#2030: raise error on non-existing tag

Merges #2030
https://pagure.io/koji/pull-request/2030

Fixes: #1101
https://pagure.io/koji/issue/1101
checkTagAccess API call should raise GenericError exception for non existing tag
This commit is contained in:
Tomas Kopecek 2020-03-11 13:54:08 +01:00
commit 33c307cbc2

View file

@ -1621,7 +1621,7 @@ def check_tag_access(tag_id, user_id=None):
override = False
if 'admin' in perms:
override = True
tag = get_tag(tag_id)
tag = get_tag(tag_id, strict=True)
if tag['locked']:
return (False, override, "tag is locked")
if tag['perm_id']: