Fix incorrectly case sensitive username finding in db. Fixes #384

This commit is contained in:
Tulir Asokan
2019-11-30 15:21:47 +02:00
parent 25d7087d07
commit 91e6a73f33
6 changed files with 15 additions and 9 deletions
+3 -1
View File
@@ -354,8 +354,10 @@ class BasePortal(ABC):
if not username:
return None
username = username.lower()
for _, portal in cls.by_tgid.items():
if portal.username and portal.username.lower() == username.lower():
if portal.username and portal.username.lower() == username:
return portal
dbportal = DBPortal.get_by_username(username)