Skip to content

Commit

Permalink
Merge pull request #1110 from nationalarchives/fix/weasy-pdf-uri
Browse files Browse the repository at this point in the history
weasy_pdf no longer has name, hardcode reference instead for now
  • Loading branch information
dragon-dxw authored Feb 21, 2024
2 parents 897d272 + adfeea3 commit 87aba5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion judgments/views/detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 87aba5f

Please sign in to comment.