From b0a7a0591007b57b1c675fda7163c1528a4d6a01 Mon Sep 17 00:00:00 2001 From: Theophile du Laz Date: Sat, 10 Feb 2024 22:01:35 -0800 Subject: [PATCH] Filter templates: permissions for fp_hists (#274) add missing permissions block in filter template for fp_hists --- kowalski/alert_brokers/alert_broker_ztf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kowalski/alert_brokers/alert_broker_ztf.py b/kowalski/alert_brokers/alert_broker_ztf.py index 0679e7f3..ad4e91e7 100644 --- a/kowalski/alert_brokers/alert_broker_ztf.py +++ b/kowalski/alert_brokers/alert_broker_ztf.py @@ -355,6 +355,10 @@ def make_filter_templates(self, active_filters: Sequence): pipeline[3]["$project"]["prv_candidates"]["$filter"]["cond"]["$and"][0][ "$in" ][1] = active_filter["permissions"] + if "fp_hists" in pipeline[3]["$project"]: + pipeline[3]["$project"]["fp_hists"]["$filter"]["cond"]["$and"][0][ + "$in" + ][1] = active_filter["permissions"] # if autosave is a dict with a pipeline key, also add the upstream pipeline to it: if (