From 46c272aa6961dbb6c98d7b53bd0dd1ae2e800307 Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Wed, 4 Dec 2024 18:27:20 +0100 Subject: [PATCH] Fix wrong assignment to AppliedControl.owner ManyToManyField --- backend/core/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/core/views.py b/backend/core/views.py index 8ad80d0c88..befa44a211 100644 --- a/backend/core/views.py +++ b/backend/core/views.py @@ -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, @@ -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) if data["duplicate_evidences"]: duplicate_related_objects( applied_control, duplicate_applied_control, new_folder, "evidences"