From 6e67f4c295d3e52732d96ed80bd5110c419c9f6a Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 22 Oct 2023 22:18:17 +0300 Subject: [PATCH] minor fix to namelock --- files/routes/awards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index d2b8db4ac..71c9f3c42 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -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 and author.namechanged: + if (not new_name or new_name == author.username) and author.namechanged: author.namechanged += 86400 else: if not valid_username_regex.fullmatch(new_name):