From 2042b8aa4cfe03b52f0082313ea4be877d660770 Mon Sep 17 00:00:00 2001 From: Matt Wright Date: Tue, 28 Aug 2012 16:25:20 -0400 Subject: [PATCH] Fixes #34 --- flask_security/views.py | 1 + tests/functional_tests.py | 1 + 2 files changed, 2 insertions(+) diff --git a/flask_security/views.py b/flask_security/views.py index dca3f61..260d5ae 100644 --- a/flask_security/views.py +++ b/flask_security/views.py @@ -227,6 +227,7 @@ def reset_password(token): form = ResetPasswordForm() if form.validate_on_submit(): + after_this_request(_commit) update_password(user, form.password.data) do_flash(*get_message('PASSWORD_RESET')) login_user(user, True) diff --git a/tests/functional_tests.py b/tests/functional_tests.py index d0e99d7..ed0af9f 100644 --- a/tests/functional_tests.py +++ b/tests/functional_tests.py @@ -424,6 +424,7 @@ class RecoverableTests(SecurityTest): 'password_confirm': 'newpassword' }, follow_redirects=True) + r = self.logout() r = self.authenticate('joe@lp.com', 'newpassword') self.assertIn('Hello joe@lp.com', r.data)