Skip to content

Commit

Permalink
adding logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkDWilliams committed Nov 16, 2023
1 parent 9023863 commit 275aa03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tr_sys/tr_ars/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand Down

0 comments on commit 275aa03

Please sign in to comment.