From 49ac549651300df891dafef6230db13d9eb2d984 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 11 Dec 2022 18:22:44 +0200 Subject: [PATCH] disallow ppl giving chud award in /h/chudrama --- files/routes/awards.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/awards.py b/files/routes/awards.py index 3defb8176..05b8ef4f3 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -266,6 +266,10 @@ def award_thing(v, thing_type, id): else: thing.stickied_utc = t g.db.add(thing) elif kind == "agendaposter": + if thing_type == 'post' and thing.sub == 'chudrama' \ + or thing_type == 'comment' and thing.post.sub == 'chudrama': + abort(403, "You can't give the chud award in /h/chudrama") + if author.marseyawarded: abort(409, f"@{author.username} is under the effect of a conflicting award: Marsey award.")