stack benefactor awards

master
Aevann 2022-12-23 02:44:52 +02:00
parent cef1227361
commit 2ad04d472c
1 changed files with 2 additions and 1 deletions

View File

@ -340,7 +340,8 @@ def award_thing(v, thing_type, id):
else: author.progressivestack = int(time.time()) + 21600
badge_grant(user=author, badge_id=94)
elif kind == "benefactor":
if author.patron: abort(409, f"@{author.username} is already a {patron.lower()}!")
if author.patron and not author.patron_utc:
abort(409, f"@{author.username} is already a {patron.lower()}!")
author.patron = 1
if author.patron_utc: author.patron_utc += 2629746
else: author.patron_utc = int(time.time()) + 2629746