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 6, 2024
1 parent 0b7112b commit 87c60c4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion backend/ebios_rm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ class Meta:
verbose_name = _("RO/TO couple")
verbose_name_plural = _("RO/TO couples")
ordering = ["created_at"]


def save(self, *args, **kwargs):
self.folder = self.ebios_rm_study.folder
Expand Down
2 changes: 1 addition & 1 deletion backend/ebios_rm/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class OperationalScenarioViewSet(BaseModelViewSet):
filterset_fields = [
"ebios_rm_study",
]

@action(detail=True, name="Get risk matrix", url_path="risk-matrix")
def risk_matrix(self, request, pk=None):
attack_path = self.get_object()
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/lib/utils/crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,7 @@ export const URL_MODEL_MAP: ModelMap = {
{ field: 'threats', urlModel: 'threats' },
{ field: 'attack_paths', urlModel: 'attack_paths' }
],
selectFields: [
{ field: 'likelihood' }
]
selectFields: [{ field: 'likelihood' }]
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const load: PageServerLoad = async ({ params, fetch }) => {

for (const selectField of selectFields) {
if (selectField.detail) continue;
const url = `${BASE_API_URL}/ebios-rm/studies/${params.id}/${selectField.field}/`
const url = `${BASE_API_URL}/ebios-rm/studies/${params.id}/${selectField.field}/`;
const response = await fetch(url);
if (response.ok) {
selectOptions[selectField.field] = await response.json().then((data) =>
Expand Down

0 comments on commit 87c60c4

Please sign in to comment.