Skip to content

Commit

Permalink
Process PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
pi-sigma committed Apr 2, 2024
1 parent e546f12 commit 8e8a09f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 621 deletions.
6 changes: 3 additions & 3 deletions src/open_inwoner/accounts/views/contactmoments.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,19 @@ def get_context_data(self, **kwargs):
},
]
origin = self.request.headers.get("Referer")
if origin == reverse("cases:contactmoment_list"):
if origin and reverse("cases:contactmoment_list") in origin:
ctx["origin"] = {
"label": _("Terug naar overzicht"),
"url": origin,
}
if zaak:
ctx["destination"] = {
"label": _("Naar aanvrag"),
"label": _("Naar aanvraag"),
"url": zaak_url,
}
else:
ctx["origin"] = {
"label": _("Terug naar aanvrag"),
"label": _("Terug naar aanvraag"),
"url": zaak_url,
}
ctx["destination"] = {
Expand Down
7 changes: 3 additions & 4 deletions src/open_inwoner/openklant/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def test_show_detail_for_bsn_with_zaak(self, m, mock_get_kcm_answer_mapping):

zaak_link = response.pyquery("#origin_link")

self.assertIn(_("Terug naar aanvrag"), zaak_link.text())
self.assertIn(_("Terug naar aanvraag"), zaak_link.text())
self.assertEqual(
zaak_link.attr("href"),
reverse(
Expand Down Expand Up @@ -354,8 +354,7 @@ def test_show_detail_for_bsn_with_zaak_reformat_esuite_id(
)

zaak_link = response.pyquery("#origin_link")

self.assertIn(_("Terug naar aanvrag"), zaak_link.text())
self.assertIn(_("Terug naar aanvraag"), zaak_link.text())
self.assertEqual(
zaak_link.attr("href"),
reverse(
Expand All @@ -364,7 +363,7 @@ def test_show_detail_for_bsn_with_zaak_reformat_esuite_id(
),
)

contactmoment_link = response.pyquery("#destination_link")
contactmoment_link = response.pyquery("#destination_link")
self.assertIn(_("Bekijk alle vragen"), contactmoment_link.text())
self.assertEqual(
contactmoment_link.attr("href"),
Expand Down
Loading

0 comments on commit 8e8a09f

Please sign in to comment.