Don't bother running the query without an address

This should solve the following in admin logs:
"WARNING in nginx: Invalid user 'xxxx': (builtins.ValueError)
invalid email address (no "@")"
master
Florent Daigniere 2 years ago
parent 2e9b14d536
commit dc81979550

@ -636,7 +636,7 @@ in clear-text regardless of the presence of the cache.
@classmethod
def get(cls, email):
""" find user object for email address """
return cls.query.get(email)
'@' in email and return cls.query.get(email)
@classmethod
def login(cls, email, password):

Loading…
Cancel
Save