From 2fbb2ee083a329f3a400fd570ac2ac72d9f22bbb Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 1 Feb 2024 19:36:35 +0200 Subject: [PATCH] revert last commit --- files/routes/asset_submissions.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/files/routes/asset_submissions.py b/files/routes/asset_submissions.py index 862caa7ba..4b2d462d0 100644 --- a/files/routes/asset_submissions.py +++ b/files/routes/asset_submissions.py @@ -21,23 +21,13 @@ def delete_unnecessary_tags(tags, name): if tag not in name and tag not in new_tags: new_tags.append(tag) - # if not new_tags: abort(400, "Invalid tags!") + if not new_tags: abort(400, "Invalid tags!") return ' '.join(new_tags) @app.get("/submit/marseys") @feature_required('EMOJI_SUBMISSIONS') def submit_marseys_redirect(): - emojis = g.db.query(Emoji).all() - - for emoji in emojis: - new_tags = delete_unnecessary_tags(emoji.tags, emoji.name) - if new_tags and new_tags != emoji.tags: - print(f'{emoji.name} Before: {emoji.tags}', flush=True) - print(f'{emoji.name} After: {new_tags}', flush=True) - emoji.tags = new_tags - g.db.add(emoji) - return redirect("/submit/emojis") @app.get("/submit/emojis")