From c6031c8a315882784e2f370e8f0966682f7981a8 Mon Sep 17 00:00:00 2001 From: "Thomson, Alec (CASS, Kensington)" Date: Sat, 18 May 2024 13:59:14 +1000 Subject: [PATCH] Add filter --- arrakis/rmclean_oncuts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arrakis/rmclean_oncuts.py b/arrakis/rmclean_oncuts.py index 9316206f..c97f528f 100644 --- a/arrakis/rmclean_oncuts.py +++ b/arrakis/rmclean_oncuts.py @@ -137,7 +137,8 @@ def rmclean1d( "rm_outputs_1d.$.rmclean_summary": outdict, } newvalues = {"$set": to_update} - return pymongo.UpdateOne(myquery, newvalues) + filter_condition = [{"elem.field": save_name}] + return pymongo.UpdateOne(myquery, newvalues, array_filters=filter_condition) @task(name="3D RM-CLEAN")