From ddb3151b61d4b5be59b24a9734c5d6d1cbb45e8b Mon Sep 17 00:00:00 2001 From: Matt Scott Date: Fri, 24 Nov 2023 11:14:09 -0500 Subject: [PATCH] Correcting bug introduced by PR 1658. --- powerdnsadmin/models/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerdnsadmin/models/user.py b/powerdnsadmin/models/user.py index 5a24c91..0596e3d 100644 --- a/powerdnsadmin/models/user.py +++ b/powerdnsadmin/models/user.py @@ -408,12 +408,12 @@ class User(db.Model): Create local user witch stores username / password in the DB """ # 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: return {'status': False, 'msg': 'Username is already in use'} # 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: return {'status': False, 'msg': 'Email address is already in use'}