From 173fe441a7c5a672ca9f830ee95c00fea07e4faa Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 15 Nov 2024 16:36:55 +0200 Subject: [PATCH] disable queen and flairlock awards on deleted accounts --- files/routes/awards.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/files/routes/awards.py b/files/routes/awards.py index 991a0c195..04c591b37 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -552,6 +552,9 @@ def award_thing(v, thing_type, id): obj.unpin_parents() else: obj.pinned_utc = t elif kind == "queen": + if author.username.startswith('deleted~'): + stop(403, "Recipient account is deleted!") + if not author.queen: characters = list(filter(str.isalpha, author.username)) if characters: @@ -610,6 +613,9 @@ def award_thing(v, thing_type, id): obj.chudded = True complies_with_chud(obj) elif kind == "flairlock": + if author.username.startswith('deleted~'): + stop(403, "Recipient account is deleted!") + new_flair = note if len(new_flair) > 100: