Skip to content

Commit

Permalink
Merge pull request #492 from NCATSTranslator/nullAttributeFix2
Browse files Browse the repository at this point in the history
Adding second scrub for null attributes
  • Loading branch information
ShervinAbd92 authored Aug 25, 2023
2 parents 4142c14 + 2268d31 commit 613bdcf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tr_sys/tr_ars/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,10 @@ def post_process(data,key, agent_name):
logging.exception("problem with node annotation post process function")
raise e
logging.info("pre appraiser")
try:
scrub_null_attributes(data)
except Exception as e:
logging.info("Problem with the second scrubbing of null attributes")
try:
appraise(mesg,data,agent_name)
logging.info("appraiser successful")
Expand Down Expand Up @@ -606,7 +610,7 @@ def appraise(mesg,data, agent_name,retry_counter=0):
rj = r.json()
#for now, just update the whole message, but we could be more precise/efficient
logging.debug("Updating message with appraiser data for agent %s and pk %s " % (agent_name, str(mesg.id)))
data['message'].update(rj['message'])
data['message']['results']=rj['message']['results']
logging.debug("Updating message with appraiser data complete for "+str(mesg.id))
else:
retry_counter +=1
Expand Down

0 comments on commit 613bdcf

Please sign in to comment.