Correcting bug introduced by PR 1658.

This commit is contained in:
Matt Scott 2023-11-24 11:14:09 -05:00
parent b494423e83
commit ddb3151b61
No known key found for this signature in database
GPG Key ID: A9A0AFFC0E079001

View File

@ -408,12 +408,12 @@ class User(db.Model):
Create local user witch stores username / password in the DB Create local user witch stores username / password in the DB
""" """
# check if username existed # check if username existed
user = User.query.filter(User.username.lower() == self.username.lower()).first() user = User.query.filter(str(User.username).lower() == self.username.lower()).first()
if user: if user:
return {'status': False, 'msg': 'Username is already in use'} return {'status': False, 'msg': 'Username is already in use'}
# check if email existed # check if email existed
user = User.query.filter(User.email.lower() == self.email.lower()).first() user = User.query.filter(str(User.email).lower() == self.email.lower()).first()
if user: if user:
return {'status': False, 'msg': 'Email address is already in use'} return {'status': False, 'msg': 'Email address is already in use'}