Skip to content

Commit

Permalink
Fix back link for initial set end user page
Browse files Browse the repository at this point in the history
  • Loading branch information
hnryjmes committed Jan 17, 2025
1 parent 2718c8f commit d6de5fa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions exporter/applications/views/parties/end_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ class SetPartyView(LoginRequiredMixin, BaseSessionWizardView):
def application(self):
return get_application(self.request, self.kwargs["pk"])

# back_link_url only needs to be set for the first question in the form wizard,
# for subsequent questions the back link is generated through another mechanism
def get_context_data(self, form, **kwargs):
context = super().get_context_data(form, **kwargs)
context.update({"back_link_url": reverse("applications:add_end_user", kwargs=self.kwargs)})
return context

def get_form_kwargs(self, step=None):
kwargs = super().get_form_kwargs(step)

Expand Down

0 comments on commit d6de5fa

Please sign in to comment.