From 707b5d3d067f17def9e1ba20d4458881a480a26a Mon Sep 17 00:00:00 2001 From: dodumosu Date: Fri, 6 Dec 2024 14:23:53 +0100 Subject: [PATCH] fix: limit results to the current location set (#1026) --- apollo/process_analysis/views_process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apollo/process_analysis/views_process.py b/apollo/process_analysis/views_process.py index 1b25fb107..dd9ebe97f 100644 --- a/apollo/process_analysis/views_process.py +++ b/apollo/process_analysis/views_process.py @@ -185,7 +185,9 @@ def _process_analysis(event, form_id, location_id=None, tag=None): if form.form_type == "INCIDENT": if display_tag: context["form_field"] = form.get_field_by_tag(display_tag) - context["location_types"] = location_types.find(is_political=True) + context["location_types"] = location_types.find( + is_political=True, location_set_id=event.location_set_id + ) context["incidents"] = filter_set.qs else: incidents_summary = generate_incidents_data(submission_dataframe, form, location, grouped, tags)