Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Dec 16, 2024
1 parent 4347236 commit 618574e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion backend/ebios_rm/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
<div class="flex items-center justify-between w-full">
<div class="flex font-bold text-2xl space-x-2">
<span
><a
class="text-primary-700 hover:text-primary-500"
href="/ebios-rm/{operationalScenario.ebios_rm_study.id}"
>{operationalScenario.ebios_rm_study.str}</a
>
- {m.operationalScenarioRefId({ refId: operationalScenario.ref_id })}</span
><a
class="text-primary-700 hover:text-primary-500"
href="/ebios-rm/{operationalScenario.ebios_rm_study.id}"
>{operationalScenario.ebios_rm_study.str}</a
>
- {m.operationalScenarioRefId({ refId: operationalScenario.ref_id })}</span
>
<p class="flex items-center">
{#if operationalScenario.is_selected}
Expand Down

0 comments on commit 618574e

Please sign in to comment.