Skip to content

Commit

Permalink
Merge branch 'main' into spec/ebios-rm3
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-intuitem committed Nov 29, 2024
2 parents f2552ca + 6584103 commit 38fab3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/startup-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
export $(grep -v '^#' .env | xargs)
- name: Config the Docker app
run: |
sleep 60 # give the migrations time to finish (included in the up on the previous step)
sleep 120 # give the migrations time to finish (included in the up on the previous step)
docker compose -f docker-compose-build.yml exec backend /bin/bash -c "[email protected] DJANGO_SUPERUSER_PASSWORD=1234 poetry run python manage.py createsuperuser --noinput && exit 0"
- name: Run tests
working-directory: ${{ env.frontend-directory }}
Expand All @@ -142,6 +142,7 @@ jobs:
exit 0
else
echo "Failure"
echo "Check if migrations are not too long"
exit 1
fi
Expand Down Expand Up @@ -258,7 +259,7 @@ jobs:
export $(grep -v '^#' .env | xargs)
- name: Config the Docker app
run: |
sleep 60 # give the migrations time to finish (included in the up on the previous step)
sleep 120 # give the migrations time to finish (included in the up on the previous step)
docker compose -f enterprise/docker-compose-build.yml exec backend /bin/bash -c "[email protected] DJANGO_SUPERUSER_PASSWORD=1234 poetry run python manage.py createsuperuser --noinput --settings=${{ env.enterprise-backend-settings-module }} && exit 0"
- name: Run tests
working-directory: ${{ env.frontend-directory }}
Expand All @@ -270,5 +271,6 @@ jobs:
exit 0
else
echo "Failure"
echo "Check if migrations are not too long"
exit 1
fi
7 changes: 7 additions & 0 deletions backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,13 @@ def get_security_objectives(self) -> dict[str, dict[str, dict[str, int | bool]]]
If the asset is a supporting asset, the security objectives are the union of the security objectives of all the primary assets it supports.
If multiple ancestors share the same security objective, its value in the result is its highest value among the ancestors.
"""
if self.security_objectives.get("objectives"):
self.security_objectives["objectives"] = {
key: self.security_objectives["objectives"][key]
for key in Asset.DEFAULT_SECURITY_OBJECTIVES
if key in self.security_objectives["objectives"]
}

if self.is_primary:
return self.security_objectives

Expand Down

0 comments on commit 38fab3e

Please sign in to comment.