From 742bbf4537c8ebe06394e1ee7ba851641372426d Mon Sep 17 00:00:00 2001 From: abdollahis2 Date: Wed, 10 Jan 2024 10:13:40 -0500 Subject: [PATCH] added a check for null scores in result's analyses --- tr_sys/tr_ars/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tr_sys/tr_ars/utils.py b/tr_sys/tr_ars/utils.py index b933b7ca..cf53502e 100644 --- a/tr_sys/tr_ars/utils.py +++ b/tr_sys/tr_ars/utils.py @@ -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: