Skip to content

Commit

Permalink
Fix wrong assignment to AppliedControl.owner ManyToManyField
Browse files Browse the repository at this point in the history
Quickfix
  • Loading branch information
monsieurswag committed Dec 4, 2024
1 parent 0acd167 commit 9a555ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,6 @@ def duplicate(self, request, pk):
folder=new_folder,
ref_id=applied_control.ref_id,
category=applied_control.category,
owner=applied_control.owner,
csf_function=applied_control.csf_function,
priority=applied_control.priority,
status=applied_control.status,
Expand All @@ -1191,6 +1190,7 @@ def duplicate(self, request, pk):
effort=applied_control.effort,
cost=applied_control.cost,
)
duplicate_applied_control.owner.set(applied_control.owner.all())
if data["duplicate_evidences"]:
duplicate_related_objects(
applied_control, duplicate_applied_control, new_folder, "evidences"
Expand Down

0 comments on commit 9a555ff

Please sign in to comment.