checking username duplicates seems to work

master
Kostanjevec 2022-06-15 02:56:17 +02:00
parent 7ac982e2b5
commit 68f50d7150
1 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,8 @@ def register():
error = 'Username is required.'
elif not password:
error = 'Password is required.'
elif dbsession.query(User).filter(User.username == username).first() != None:
error = "Username already exists, please choose another one"
if error is None:
try: