From 7566239a7792235bf0cf1df4d5eba10e9c289589 Mon Sep 17 00:00:00 2001 From: Tom Searle Date: Thu, 19 Sep 2024 17:47:45 +0100 Subject: [PATCH] CU-8695w36y1: fix for metric report loading --- webapp/api/api/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/api/api/metrics.py b/webapp/api/api/metrics.py index d9d2fe61..918f71da 100644 --- a/webapp/api/api/metrics.py +++ b/webapp/api/api/metrics.py @@ -43,7 +43,7 @@ def calculate_metrics(project_ids: List[int], report_name: str): """ logger.info('Calculating metrics for report: %s', report_name) projects = [ProjectAnnotateEntities.objects.filter(id=p_id).first() for p_id in project_ids] - if projects[0].cdb is None: + if projects[0].model_pack: # assume the model pack is set. cat = CAT.load_model_pack(projects[0].model_pack.model_pack.path) else: