diff options
author | zsloan | 2020-09-22 16:47:24 -0500 |
---|---|---|
committer | zsloan | 2020-09-22 16:47:24 -0500 |
commit | 00cefa3d42c3e2b6633573eb124e1bcf68cea7ab (patch) | |
tree | 33ad99b56159be04d9fc4f03833e395071df6736 /wqflask | |
parent | f887ee8ca60d5c18c394b04a9bc5a9341da95327 (diff) | |
download | genenetwork2-00cefa3d42c3e2b6633573eb124e1bcf68cea7ab.tar.gz |
Fixed a pretty big mistake where user accounts would be saved even when
there was some mistake/error during registration
* wqflask/wqflask/user_login.py - Previously it would still save a user
even if there was some problem like their e-mail already being
associated with an account. It would display the error, but still run
save_user. I fixed this so that it no longer saves the user if there are
any errors
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/user_login.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wqflask/wqflask/user_login.py b/wqflask/wqflask/user_login.py index 9331f369..077a799b 100644 --- a/wqflask/wqflask/user_login.py +++ b/wqflask/wqflask/user_login.py @@ -453,7 +453,9 @@ def register_user(params): user_details['confirmed'] = 1 user_details['registration_info'] = basic_info() - save_user(user_details, user_details['user_id']) + + if len(errors) == 0: + save_user(user_details, user_details['user_id']) return errors |