From 275aa0315ddbd7591f9d40b2291c48240dd86858 Mon Sep 17 00:00:00 2001 From: Williams Date: Thu, 16 Nov 2023 16:15:20 -0500 Subject: [PATCH] adding logging --- tr_sys/tr_ars/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tr_sys/tr_ars/utils.py b/tr_sys/tr_ars/utils.py index a353fa46..c0033b26 100644 --- a/tr_sys/tr_ars/utils.py +++ b/tr_sys/tr_ars/utils.py @@ -620,6 +620,7 @@ def remove_blocked(mesg, blocklist=None): data=mesg.data results = get_safe(data,"message","results") to_remove = [] + removed_ids=[] for result in results: node_bindings = get_safe(result,"node_bindings") if node_bindings is not None: @@ -629,10 +630,13 @@ def remove_blocked(mesg, blocklist=None): the_id = get_safe(c,"id") if the_id in blocklist: to_remove.append(result) + removed_ids.append(the_id) + for removal in to_remove: results.remove(removal) blocked_version.data=data blocked_version.save() + logging.info('Removing results containing the following %s from PK: %s' % (str(removed_ids), str(blocked_version.id))) return str(blocked_version.id) def scrub_null_attributes(data):