From ef4fd62f2e7482abf49af673bd9c19596d4fcfa2 Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Tue, 27 Feb 2024 16:41:56 +0100 Subject: [PATCH] Add links to x-rays --- backend/core/models.py | 4 ++-- frontend/src/routes/(app)/x-rays/+page.svelte | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/core/models.py b/backend/core/models.py index 3999bc642..679693fa0 100644 --- a/backend/core/models.py +++ b/backend/core/models.py @@ -610,7 +610,7 @@ def quality_check(self) -> dict: "errors": errors_lst, "warnings": warnings_lst, "info": info_lst, - "count": len(errors_lst + warnings_lst + info_lst), + "count": sum(len(errors_lst), len(warnings_lst), len(info_lst)), } return findings @@ -1389,7 +1389,7 @@ def quality_check(self) -> dict: "errors": errors_lst, "warnings": warnings_lst, "info": info_lst, - "count": len(errors_lst + warnings_lst + info_lst), + "count": sum(len(errors_lst), len(warnings_lst), len(info_lst)), } return findings diff --git a/frontend/src/routes/(app)/x-rays/+page.svelte b/frontend/src/routes/(app)/x-rays/+page.svelte index 048e12283..9c5b2f323 100644 --- a/frontend/src/routes/(app)/x-rays/+page.svelte +++ b/frontend/src/routes/(app)/x-rays/+page.svelte @@ -10,7 +10,7 @@ types.forEach((type) => { result[type] = Object.entries(item.objects).reduce((acc, [key, value]) => { - if (key !== 'object') { + if (key !== 'object') { // if key === 'quality_check' acc = [...acc, ...value.quality_check[type]]; } return acc; @@ -83,7 +83,7 @@