From 1ebdfabb70aaa0adb33b4e8c6b1707cab0d83c34 Mon Sep 17 00:00:00 2001 From: Bee Webb Date: Tue, 28 Jan 2025 14:12:01 +0000 Subject: [PATCH] fix: 404 for unknown publisher page instead of 500 --- iati_dashboard/ui/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/iati_dashboard/ui/views.py b/iati_dashboard/ui/views.py index 81db14f66..183de776a 100644 --- a/iati_dashboard/ui/views.py +++ b/iati_dashboard/ui/views.py @@ -280,6 +280,9 @@ def headlines_files(request): def headlines_publisher_detail(request, publisher=None): + if publisher not in publisher_name: + raise Http404("Publisher does not exist") + template = loader.get_template("publisher.html") context = _make_context("publishers")