forked from MarseyWorld/MarseyWorld
give error when tags dont actually get changed
parent
a7a259381d
commit
eecae3850d
|
@ -602,9 +602,11 @@ def update_emoji(v):
|
||||||
if tags and existing.tags != tags:
|
if tags and existing.tags != tags:
|
||||||
if not tags_regex.fullmatch(tags):
|
if not tags_regex.fullmatch(tags):
|
||||||
stop(400, "Invalid tags!")
|
stop(400, "Invalid tags!")
|
||||||
existing.tags += f" {tags}"
|
new_tags = f"{existing.tags} {tags}"
|
||||||
existing.tags = delete_unnecessary_tags(existing.tags, existing.name)
|
new_tags = delete_unnecessary_tags(new_tags, existing.name)
|
||||||
updated = True
|
if new_tags != existing.tags:
|
||||||
|
existing.tags = new_tags
|
||||||
|
updated = True
|
||||||
|
|
||||||
if nsfw:
|
if nsfw:
|
||||||
nsfw = (nsfw == 'NSFW')
|
nsfw = (nsfw == 'NSFW')
|
||||||
|
|
Loading…
Reference in New Issue