disallow grassing urself

master
Aevann 2024-04-05 11:40:26 +02:00
parent f4d4ec7274
commit c78380ff35
1 changed files with 4 additions and 1 deletions

View File

@ -167,7 +167,10 @@ def award_thing(v, thing_type, id):
AWARDS[v.house] = HOUSE_AWARDS[v.house]
if kind not in AWARDS:
abort(404, "This award doesn't exist")
abort(404, "This award doesn't exist.")
if kind == "grass" and v.id == author.id:
abort(403, "You can't grass yourself.")
award_title = AWARDS[kind]['title']