Fix combined scores if multiple components report it

This commit is contained in:
Ines Montani 2020-09-24 17:11:13 +02:00
parent 0b52b6904c
commit 26e28ed413
1 changed files with 3 additions and 1 deletions

View File

@ -1237,7 +1237,9 @@ def combine_score_weights(
weight = 0.0
else:
weight = round(value / total / len(all_weights), 2)
result[key] = result.get(key, 0.0) + weight
prev_weight = result.get(key, 0.0)
prev_weight = 0.0 if prev_weight is None else prev_weight
result[key] = prev_weight + weight
return result