Fix incorrectly case sensitive username finding in db. Fixes #384
This commit is contained in:
@@ -424,8 +424,10 @@ class User(AbstractUser, BaseUser):
|
||||
if not username:
|
||||
return None
|
||||
|
||||
username = username.lower()
|
||||
|
||||
for _, user in cls.by_tgid.items():
|
||||
if user.username and user.username.lower() == username.lower():
|
||||
if user.username and user.username.lower() == username:
|
||||
return user
|
||||
|
||||
puppet = DBUser.get_by_username(username)
|
||||
|
||||
Reference in New Issue
Block a user