forked from rDrama/rDrama
fix this https://rdrama.net/h/changelog/post/165657/changelog-megathread-marseynotes/4145574#context
parent
656a79b604
commit
375f82969b
|
@ -353,6 +353,10 @@ def award_thing(v, thing_type, id):
|
||||||
if not valid_username_regex.fullmatch(new_name):
|
if not valid_username_regex.fullmatch(new_name):
|
||||||
abort(400, "Invalid username")
|
abort(400, "Invalid username")
|
||||||
|
|
||||||
|
existing = get_user(new_name, graceful=True)
|
||||||
|
if existing:
|
||||||
|
abort(400, f"@{new_name} is already taken!")
|
||||||
|
|
||||||
if not new_name and author.prelock_username:
|
if not new_name and author.prelock_username:
|
||||||
author.namechanged += 86400
|
author.namechanged += 86400
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue