Skip to content

Commit

Permalink
Merge pull request #93 from intuitem/hotfix/xrays
Browse files Browse the repository at this point in the history
Update +page.svelte
  • Loading branch information
Mohamed-Hacene authored Feb 29, 2024
2 parents f9dfeef + 370c996 commit 9c0c6c8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
15 changes: 13 additions & 2 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/routes/(app)/x-rays/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@
<div class="space-y-2">
<div class="variant-soft-secondary rounded-token px-2 py-1">
<i class="fa-solid fa-circle-info mr-1" />
{#if quality_check.infos.length === 1}
<span class="font-bold">{quality_check.infos.length}</span>
{#if quality_check.info.length === 1}
<span class="font-bold">{quality_check.info.length}</span>
{m.infosFound({ s: ''})}
{:else}
<span class="font-bold">{quality_check.infos.length}</span>
<span class="font-bold">{quality_check.info.length}</span>
{m.infosFound({ s: 's'})}
{/if}
</div>
Expand Down Expand Up @@ -202,11 +202,11 @@
<div class="space-y-2">
<div class="variant-soft-secondary rounded-token px-2 py-1">
<i class="fa-solid fa-circle-info mr-1" />
{#if quality_check.infos.length === 1}
<span class="font-bold">{quality_check.infos.length}</span>
{#if quality_check.info.length === 1}
<span class="font-bold">{quality_check.info.length}</span>
{m.infosFound({ s: ''})}
{:else}
<span class="font-bold">{quality_check.infos.length}</span>
<span class="font-bold">{quality_check.info.length}</span>
{m.infosFound({ s: 's'})}
{/if}
</div>
Expand Down

0 comments on commit 9c0c6c8

Please sign in to comment.