forked from MarseyWorld/MarseyWorld
awards: move sb check to be earlier to avoid a query in rare cases
parent
8705a5f39a
commit
1d063e39ab
|
@ -132,6 +132,8 @@ def award_thing(v, thing_type, id):
|
|||
if not thing.parent_submission: abort(404) # don't let users award messages
|
||||
|
||||
if v.shadowbanned: abort(500)
|
||||
author = thing.author
|
||||
if author.shadowbanned: abort(404)
|
||||
|
||||
kind = request.values.get("kind", "").strip()
|
||||
|
||||
|
@ -158,8 +160,6 @@ def award_thing(v, thing_type, id):
|
|||
|
||||
note = request.values.get("note", "").strip()
|
||||
|
||||
author = thing.author
|
||||
if author.shadowbanned: abort(404)
|
||||
|
||||
if SITE == 'rdrama.net' and author.id in (PIZZASHILL_ID, CARP_ID):
|
||||
abort(403, f"@{author.username} is immune to awards.")
|
||||
|
|
Loading…
Reference in New Issue