Skip to content

Commit abaceca

Browse files
authored
fix(eng/failure_redirect): Broken rendering when comming from product site (#13042)
1 parent c7e3d5b commit abaceca

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

dojo/engagement/views.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,9 +1053,14 @@ def failure_redirect(
10531053
) -> HttpResponseRedirect:
10541054
"""Redirect the user to a place that indicates a failed import"""
10551055
ErrorPageProductAnnouncement(request=request)
1056+
if obj := context.get("engagement"):
1057+
url = "import_scan_results"
1058+
else:
1059+
obj = context.get("product")
1060+
url = "import_scan_results_prod"
10561061
return HttpResponseRedirect(reverse(
1057-
"import_scan_results",
1058-
args=(context.get("engagement", context.get("product")).id, ),
1062+
url,
1063+
args=(obj.id, ),
10591064
))
10601065

10611066
def get(

0 commit comments

Comments
 (0)