Skip to content

Commit

Permalink
fix: eager set cast of possibly None implementation_groups field (#1410)
Browse files Browse the repository at this point in the history
* Fix eager set cast of possibly None implementation_groups field

* fix missing IG

this was causing the issue with null set

---------

Co-authored-by: eric-intuitem <[email protected]>
  • Loading branch information
nas-tabchiche and eric-intuitem authored Jan 23, 2025
1 parent 604b405 commit 2b78b69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2829,7 +2829,7 @@ def get_global_score(self):
n = 0

for ras in requirement_assessments_scored:
if not (ig) or (ig & set(ras.requirement.implementation_groups)):
if not (ig) or (ig & set(ras.requirement.implementation_groups or [])):
score += ras.score or 0
n += 1
if self.show_documentation_score:
Expand Down
6 changes: 4 additions & 2 deletions backend/library/libraries/anssi-guide-hygiene-detail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ name: "ANSSI - Guide d'hygi\xE8ne informatique - version d\xE9taill\xE9e"
description: "Renforcer la s\xE9curit\xE9 de son syst\xE8me d\u2019information en\
\ 42 mesures\nVersion d\xE9taill\xE9e\n https://cyber.gouv.fr/sites/default/files/2017/01/guide_hygiene_informatique_anssi.pdf"
copyright: Licence Ouverte/Open Licence (Etalab - V1)
version: 2
publication_date: 2024-12-08
version: 3
publication_date: 2025-01-23
provider: ANSSI
packager: intuitem
dependencies:
Expand Down Expand Up @@ -607,6 +607,8 @@ objects:
s leur d\xE9part, soit au travers du contrat de travail, soit d'un autre contrat\
\ (NDA).\nV\xE9rifier que la proc\xE9dure de d\xE9part contient bien un rappel\
\ des r\xE8gles de confidentialit\xE9 s'appliquant apr\xE8s le d\xE9part."
implementation_groups:
- S
reference_controls:
- urn:intuitem:risk:function:doc-pol:pol.access
- urn: urn:intuitem:risk:req_node:anssi-guide-hygiene-detail:6:1:1
Expand Down
Binary file modified tools/anssi/anssi-guide-hygiene-detail.xlsx
Binary file not shown.

0 comments on commit 2b78b69

Please sign in to comment.