From adfeea357335925a645c34b1fc31345ed85b35a8 Mon Sep 17 00:00:00 2001 From: Dragon Dave McKee Date: Wed, 21 Feb 2024 15:06:01 +0000 Subject: [PATCH] weasy_pdf no longer has name, hardcode reference instead for now --- judgments/views/detail.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/judgments/views/detail.py b/judgments/views/detail.py index 2df790095..4262bb405 100644 --- a/judgments/views/detail.py +++ b/judgments/views/detail.py @@ -85,7 +85,13 @@ def get_best_pdf(request, document_uri): f"Unexpected {response.status_code} error on {document_uri} whilst trying to get_best_pdf" ) # fall back to weasy_pdf - return redirect(reverse("weasy_pdf", kwargs={"document_uri": document_uri})) + + return redirect( + reverse( + "detail", + kwargs={"document_uri": document_uri, "file_format": "generated.pdf"}, + ) + ) def detail(request, document_uri):