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 (