diff --git a/bifrost/bifrost_queue_broker/brokers/pulling/tbr_pulling_broker.py b/bifrost/bifrost_queue_broker/brokers/pulling/tbr_pulling_broker.py index ed63ed7..7878cd1 100644 --- a/bifrost/bifrost_queue_broker/brokers/pulling/tbr_pulling_broker.py +++ b/bifrost/bifrost_queue_broker/brokers/pulling/tbr_pulling_broker.py @@ -85,9 +85,12 @@ def run_sync_job(self): # {"$unwind": {"path": "$metadata", "preserveNullAndEmptyArrays": True}}, { "$match": { - "$or": [ - {"metadata.gdpr_deleted": {"$exists": False}}, - {"metadata.gdpr_deleted": False}, + "$and": [ + {"isolate_id": {"$ne": null}}, + {"$or": [ + {"metadata.gdpr_deleted": {"$exists": False}}, + {"metadata.gdpr_deleted": False}, + ]} ] } },