Skip to content

Commit

Permalink
added a check for null scores in result's analyses
Browse files Browse the repository at this point in the history
  • Loading branch information
abdollahis2 authored and abdollahis2 committed Jan 10, 2024
1 parent 0388126 commit 742bbf4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tr_sys/tr_ars/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,10 @@ def normalizeScores(results):
temp_score = []
for analysis in res['analyses']:
if 'score' in analysis.keys():
temp_score.append(analysis['score'])
if analysis['score'] is not None:
temp_score.append(analysis['score'])
else:
logging.error("Analyses score field is null")
score = statistics.mean(temp_score)

elif len(res['analyses']) == 1:
Expand Down

0 comments on commit 742bbf4

Please sign in to comment.