aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/auth.py1
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))