From e74f641733111427b0cf08a8af0d3cc90cd7531f Mon Sep 17 00:00:00 2001 From: paulmwatson Date: Tue, 19 Mar 2024 18:02:20 +0200 Subject: [PATCH] Fix --- budgetportal/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/budgetportal/views.py b/budgetportal/views.py index 471e77f1..f772a3b3 100644 --- a/budgetportal/views.py +++ b/budgetportal/views.py @@ -509,7 +509,7 @@ def department_page( context["public_entities"] = [] - for public_entity in PublicEntity.objects.filter(department__slug=department_slug): + for public_entity in PublicEntity.objects.filter(department__slug=department_slug, government=department.government): context["public_entities"].append( { "name": public_entity.name, @@ -523,6 +523,7 @@ def department_page( def public_entity_page( request, financial_year_id, sphere_slug, government_slug, public_entity_slug ): + raise() public_entity = None selected_year = get_object_or_404(FinancialYear, slug=financial_year_id)