Skip to content

Commit

Permalink
removed a public endpoint that is unused and is causing 500 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
smcmurtry committed Sep 18, 2023
1 parent ffeaf1d commit 799ad93
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions app/main/views/agreement.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,3 @@ def service_confirm_agreement(service_id):
return redirect(url_for("main.request_to_go_live", service_id=current_service.id))

return render_template("views/agreement/agreement-confirm.html")


@main.route("/agreement/<variant>", endpoint="public_agreement")
@main.route("/agreement/<variant>.pdf", endpoint="public_download_agreement")
def public_agreement(variant):
if variant not in {"crown", "non-crown"}:
abort(404)

if request.endpoint == "main.public_download_agreement":
return send_file(**get_mou(organisation_is_crown=(variant == "crown")))

return render_template(
"views/agreement/agreement-public.html",
owner=current_user.default_organisation.name,
download_link=url_for(".public_download_agreement", variant=variant),
)

0 comments on commit 799ad93

Please sign in to comment.