From 618574e5adb907187b1705811220ef3c4345d670 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Mon, 16 Dec 2024 15:10:05 +0100 Subject: [PATCH] chore: format --- backend/ebios_rm/views.py | 3 ++- .../operational-scenarios/[id=uuid]/+page.svelte | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/backend/ebios_rm/views.py b/backend/ebios_rm/views.py index bee8cc0ee..5c9515d04 100644 --- a/backend/ebios_rm/views.py +++ b/backend/ebios_rm/views.py @@ -126,11 +126,12 @@ def category(self, request): class AttackPathFilter(df.FilterSet): used = df.BooleanFilter(method="is_used", label="Used") - + def is_used(self, queryset, name, value): if value: return queryset.filter(operational_scenario__isnull=False) return queryset.filter(operational_scenario__isnull=True) + class Meta: model = AttackPath fields = ["ebios_rm_study", "is_selected", "used"] diff --git a/frontend/src/routes/(app)/(internal)/operational-scenarios/[id=uuid]/+page.svelte b/frontend/src/routes/(app)/(internal)/operational-scenarios/[id=uuid]/+page.svelte index 48b9ffc0d..0a14446a3 100644 --- a/frontend/src/routes/(app)/(internal)/operational-scenarios/[id=uuid]/+page.svelte +++ b/frontend/src/routes/(app)/(internal)/operational-scenarios/[id=uuid]/+page.svelte @@ -45,12 +45,12 @@
{operationalScenario.ebios_rm_study.str} - - {m.operationalScenarioRefId({ refId: operationalScenario.ref_id })}{operationalScenario.ebios_rm_study.str} + - {m.operationalScenarioRefId({ refId: operationalScenario.ref_id })}

{#if operationalScenario.is_selected}