Skip to content

Commit

Permalink
Codefactor fix 4
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Oct 21, 2024
1 parent 15ed2bb commit 5d1eb96
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,19 +955,34 @@ def duplicate_into_folder(
applied_control: AppliedControl, data: dict, folder: Folder
) -> AppliedControl:
return AppliedControl.objects.create(
reference_control=applied_control.reference_control,
# reference_control=applied_control.reference_control,
name=data["name"],
description=data["description"],
folder=new_folder,
category=applied_control.category,
csf_function=applied_control.csf_function,
status=applied_control.status,
start_date=applied_control.start_date,
eta=applied_control.eta,
expiry_date=applied_control.expiry_date,
link=applied_control.link,
effort=applied_control.effort,
cost=applied_control.cost,
**{
key: getattr(applied_control, key)
for key in [
"reference_control",
"category",
"csf_function",
"status",
"start_date",
"eta",
"expiry_date",
"link",
"effort",
"cost",
]
},
# category=applied_control.category,
# csf_function=applied_control.csf_function,
# status=applied_control.status,
# start_date=applied_control.start_date,
# eta=applied_control.eta,
# expiry_date=applied_control.expiry_date,
# link=applied_control.link,
# effort=applied_control.effort,
# cost=applied_control.cost,
)

applied_control = self.get_object()
Expand Down

0 comments on commit 5d1eb96

Please sign in to comment.