diff options
| author | Fulgen301 <tokmajigeorge@gmail.com> | 2018-09-16 18:18:06 +0200 |
|---|---|---|
| committer | Fulgen301 <tokmajigeorge@gmail.com> | 2018-09-16 18:18:06 +0200 |
| commit | db8765a3c75a705954c78bac0c9e5e24aeb18d6d (patch) | |
| tree | 49aed7120f9ed344440794deb75ff243209dcf07 /routes/auth.py | |
| parent | c5690d5fa130bd66f920fbc2f2df033f10db1c79 (diff) | |
| download | parry-db8765a3c75a705954c78bac0c9e5e24aeb18d6d.tar.gz parry-db8765a3c75a705954c78bac0c9e5e24aeb18d6d.zip | |
auth: Fix registration process
Diffstat (limited to 'routes/auth.py')
| -rw-r--r-- | routes/auth.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routes/auth.py b/routes/auth.py index 6c2e976..d6b6ffd 100644 --- a/routes/auth.py +++ b/routes/auth.py @@ -25,6 +25,7 @@ def post_auth_new(): hash = calculateUserHash(username, password).hexdigest() try: + session.query(User).filter(User.name == username or User.hash == hash).one() raise HTTPResponse("User already exists", status=409) except db.orm.exc.NoResultFound: session.add(User(name=username, hash=hash)) |
