From 8714e0830cdb87486d9ee8ed99fddc436c06cce7 Mon Sep 17 00:00:00 2001 From: Francis Odhiambo Otieno <{ID}+{f-odhiambo}@users.noreply.github.com> Date: Fri, 2 Feb 2024 11:23:46 +0300 Subject: [PATCH] Update delete function --- cleaner/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cleaner/main.py b/cleaner/main.py index 5b4c7073..9db31656 100644 --- a/cleaner/main.py +++ b/cleaner/main.py @@ -163,7 +163,8 @@ def main(resource_type, parameter, value, batch_size, expunge, cascade, log_leve + "&_count=" + str(batch_size) ) - delete_resources(resource_url, resource_type) + if not cascade: + delete_resources(resource_url, resource_type) if expunge: expunge_url = config.fhir_base_url + "/" + resource_type + "/$expunge" expunge_resources(expunge_url)