diff --git a/auth.py b/auth.py index 5e07073..4660785 100644 --- a/auth.py +++ b/auth.py @@ -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: