diff --git a/api/app/services/model_service.py b/api/app/services/model_service.py index ef3b80e2..ed4531f9 100644 --- a/api/app/services/model_service.py +++ b/api/app/services/model_service.py @@ -96,7 +96,7 @@ def get_summarized_percentages(self) -> TotPercentagesDTO: mq, mq_c = 0, 0 dr, dr_c = 0, 0 for _, metrics in models: - if metrics: + if metrics and metrics.percentages: dq = dq + ( metrics.percentages['data_quality']['value'] if metrics.percentages['data_quality']['value'] >= 0