Skip to content

Commit

Permalink
Formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Oct 21, 2024
1 parent 6a78979 commit dc80e5b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
from rest_framework.renderers import JSONRenderer
from rest_framework.request import Request
from rest_framework.response import Response
from rest_framework.status import HTTP_400_BAD_REQUEST, HTTP_403_FORBIDDEN, HTTP_404_NOT_FOUND
from rest_framework.status import (
HTTP_400_BAD_REQUEST,
HTTP_403_FORBIDDEN,
HTTP_404_NOT_FOUND,
)
from rest_framework.utils.serializer_helpers import ReturnDict
from rest_framework.views import APIView

Expand Down Expand Up @@ -942,7 +946,9 @@ def duplicate(self, request, pk):
Folder.get_root_folder(), request.user, AppliedControl
)
if UUID(pk) not in object_ids_view:
return Response({"results": "applied control duplicated"}, status=HTTP_404_NOT_FOUND)
return Response(
{"results": "applied control duplicated"}, status=HTTP_404_NOT_FOUND
)

applied_control = self.get_object()
data = request.data
Expand All @@ -963,7 +969,9 @@ def duplicate(self, request, pk):
cost=applied_control.cost,
)
if request.data["duplicate_evidences"]:
duplicate_related_objects(applied_control, duplicate_applied_control, new_folder, "evidences")
duplicate_related_objects(
applied_control, duplicate_applied_control, new_folder, "evidences"
)
# Delete the can_access method
# Delete the duplicate_into_folder method
duplicate_applied_control.save()
Expand Down

0 comments on commit dc80e5b

Please sign in to comment.