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 @@
{#if operationalScenario.is_selected}