From ab1b2a4b8106060d4c2c81348800a1d90851b6a7 Mon Sep 17 00:00:00 2001 From: Francis Odhiambo <4540684+f-odhiambo@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:11:29 +0300 Subject: [PATCH] Update delete function (#125) Co-authored-by: Francis Odhiambo Otieno <{ID}+{f-odhiambo}@users.noreply.github.com> Co-authored-by: Sebastian <36365043+SebaMutuku@users.noreply.github.com> --- 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)