Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-intuitem committed Dec 8, 2024
1 parent 0aee2fc commit d6c3262
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions backend/library/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,15 @@ def import_requirement_node(self, framework_object: Framework):
is_published=True,
question=self.requirement_data.get("question"),
)
print(requirement_node)
for threat in self.requirement_data.get("threats", []):
requirement_node.threats.add(
Threat.objects.get(urn=threat.lower())
) # URN are not case insensitive in the whole codebase yet, we should fix that and make sure URNs are always transformed into lowercase before being used.

for reference_control in self.requirement_data.get("reference_controls", []):
print(reference_control)
requirement_node.reference_controls.add(
ReferenceControl.objects.get(urn=reference_control.lower())
)
print("done", reference_control)


class RequirementMappingImporter:
Expand Down

0 comments on commit d6c3262

Please sign in to comment.