Fix exception when trying to register existing user

This commit is contained in:
David Hoppenbrouwers
2022-10-08 15:59:58 +02:00
parent e093a30157
commit 6a6c5eb804
2 changed files with 21 additions and 15 deletions

View File

@@ -274,7 +274,7 @@ def register():
):
flash('CAPTCHA answer is incorrect', 'error')
elif not db.add_user(username, hash_password(password), time.time_ns()):
flash('Failed to create user (username may already be taken)')
flash('Failed to create account (username may already be taken)', 'error')
else:
flash('Account has been created. You can login now.', 'success')
return redirect(url_for('index'))