Fix attempting to set protected tag in API dropping other tags

This commit is contained in:
rubenwardy 2022-01-29 19:25:02 +00:00
parent 14fd30c4f4
commit 4f9ec2e8a4
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ def do_edit_package(user: User, package: Package, was_new: bool, was_web: bool,
raise LogicError(400, "Unknown tag: " + tag_id)
if not was_web and tag.is_protected:
break
continue
if tag.is_protected and tag not in old_tags and not user.rank.atLeast(UserRank.EDITOR):
raise LogicError(400, lazy_gettext("Unable to add protected tag %(title)s to package", title=tag.title))