From e2642d447c04ec06054e32136498204bfb602963 Mon Sep 17 00:00:00 2001 From: eric-intuitem <71850047+eric-intuitem@users.noreply.github.com> Date: Thu, 29 Feb 2024 00:05:54 +0100 Subject: [PATCH 1/2] Update +page.svelte fix name error for info variable --- frontend/src/routes/(app)/x-rays/+page.svelte | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/routes/(app)/x-rays/+page.svelte b/frontend/src/routes/(app)/x-rays/+page.svelte index 48a39729d..d38f06be2 100644 --- a/frontend/src/routes/(app)/x-rays/+page.svelte +++ b/frontend/src/routes/(app)/x-rays/+page.svelte @@ -130,11 +130,11 @@
- {#if quality_check.infos.length === 1} - {quality_check.infos.length} + {#if quality_check.info.length === 1} + {quality_check.info.length} {m.infosFound({ s: ''})} {:else} - {quality_check.infos.length} + {quality_check.info.length} {m.infosFound({ s: 's'})} {/if}
@@ -202,11 +202,11 @@
- {#if quality_check.infos.length === 1} - {quality_check.infos.length} + {#if quality_check.info.length === 1} + {quality_check.info.length} {m.infosFound({ s: ''})} {:else} - {quality_check.infos.length} + {quality_check.info.length} {m.infosFound({ s: 's'})} {/if}
From 370c9961a1ca42dc10f877acc1c536dd5391909f Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Thu, 29 Feb 2024 11:53:51 +0100 Subject: [PATCH 2/2] fix: assessments no authors x-rays info --- backend/core/models.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/backend/core/models.py b/backend/core/models.py index a44996839..70bd43223 100644 --- a/backend/core/models.py +++ b/backend/core/models.py @@ -776,11 +776,11 @@ def quality_check(self) -> dict: "object": _object, } ) - if not self.authors: + if not self.authors.all(): info_lst.append( { "msg": _( - "{}: No author assigned to this risk risk assessment" + "{}: No author assigned to this risk assessment" ).format(str(self)), "obj_type": "risk_assessment", "object": _object, @@ -1314,6 +1314,17 @@ def quality_check(self) -> dict: "object": _object, } ) + + if not self.authors.all(): + info_lst.append( + { + "msg": _( + "{}: No author assigned to this compliance assessment" + ).format(str(self)), + "obj_type": "complianceassessment", + "object": _object, + } + ) # --- # --- check on requirement assessments: