From dc80e5b409d09de85e497996d2008356b9408b7e Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Mon, 21 Oct 2024 17:57:59 +0200 Subject: [PATCH] Formatter --- backend/core/views.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/backend/core/views.py b/backend/core/views.py index a437f7094..ddc6aaf3d 100644 --- a/backend/core/views.py +++ b/backend/core/views.py @@ -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 @@ -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 @@ -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()