mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-02 16:02:15 +02:00
fixed 500 error
This commit is contained in:
parent
18b7c17aad
commit
c7a5b50a45
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
|||
"""Views for a User Profile.
|
||||
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
@ -68,7 +67,8 @@ class UserProfileView(UserProfilePermissionView, FormMixin):
|
|||
|
||||
# Show back button conditional on user having finished setup
|
||||
context["show_back_button"] = False
|
||||
if hasattr(self.user, "finished_setup") and self.user.finished_setup:
|
||||
form = self.get_form()
|
||||
if hasattr(self.user, "finished_setup") and self.user.finished_setup and form.is_valid():
|
||||
context["user_finished_setup"] = True
|
||||
context["show_back_button"] = True
|
||||
|
||||
|
@ -144,7 +144,8 @@ class FinishProfileSetupView(UserProfileView):
|
|||
|
||||
# Show back button conditional on user having finished setup
|
||||
context["show_back_button"] = False
|
||||
if hasattr(self.user, "finished_setup") and self.user.finished_setup:
|
||||
form = self.get_form()
|
||||
if hasattr(self.user, "finished_setup") and self.user.finished_setup and form.is_valid():
|
||||
if kwargs.get("redirect") == "home":
|
||||
context["show_back_button"] = True
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue