diff --git a/files/routes/awards.py b/files/routes/awards.py index 11076265d..01aa932de 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -578,6 +578,9 @@ def award_thing(v, thing_type, id): emoji = g.db.query(Emoji).filter_by(name=award.note).one_or_none() if not emoji: abort(404, f'an Emoji with the name "{award.note}" was not found!') + emoji_behavior = request.values.get("emoji_behavior").strip() + if emoji_behavior == "horizontal": + award.kind = "emoji-hz" elif kind == "grinch": if author.grinch: abort(409, f"{safe_username} already has this profile upgrade!") @@ -666,11 +669,6 @@ def award_thing(v, thing_type, id): g.db.add(obj) - if award.kind == "emoji": - emoji_behavior = request.values.get("emoji_behavior").strip() - if emoji_behavior == "horizontal": - award.kind = "emoji-hz" - plural = '' if quantity == 1 else 's' return {"message": f"{award_title} award{plural} given to {thing_type} successfully!"}