avoid potential server error

master
Aevann 2023-06-22 20:56:46 +03:00
parent 9838398d55
commit 24ea1414d6
1 changed files with 2 additions and 0 deletions

View File

@ -339,6 +339,8 @@ def award_thing(v, thing_type, id):
existing = get_user(new_name, graceful=True)
if not existing: break
name_index += 1
if name_index > (len(GIRL_NAMES) - 1):
name_index = 0
if not author.prelock_username:
author.prelock_username = author.username