Fix 500 error if revisiting registration page

If you go back to this part of the registration flow then you get a 500
error, because we’re relying on something in the session. We clear the
registration info from the session after you’ve registered successfully.

Also there were no tests for the happy path of this page either
¯\_(ツ)_/¯
This commit is contained in:
Chris Hill-Scott
2017-04-27 11:55:50 +01:00
parent 3e72e0d722
commit 1a05e33fa4
2 changed files with 18 additions and 4 deletions

View File

@@ -89,4 +89,6 @@ def _do_registration(form, service=None, send_sms=True, send_email=True):
@main.route('/registration-continue')
def registration_continue():
if not session.get('user_details'):
return redirect(url_for('.show_all_services_or_dashboard'))
return render_template('views/registration-continue.html')