reorder if condition

pull/216/head
Aevann 2023-10-22 22:18:38 +03:00
parent 6e67f4c295
commit c2e4eda509
1 changed files with 1 additions and 1 deletions

View File

@ -406,7 +406,7 @@ def award_thing(v, thing_type, id):
badge_grant(user=author, badge_id=96)
elif kind == "namelock":
new_name = note.strip().lstrip('@')
if (not new_name or new_name == author.username) and author.namechanged:
if author.namechanged and (not new_name or new_name == author.username):
author.namechanged += 86400
else:
if not valid_username_regex.fullmatch(new_name):