Skip to content

Commit 58c4681

Browse files
author
nasreenkhannam
committed
Fix indentation for actions
1 parent a7a0274 commit 58c4681

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

scanpipe/api/views.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,21 +139,28 @@ class ProjectViewSet(
139139
queryset = Project.objects.all()
140140
serializer_class = ProjectSerializer
141141
from rest_framework.response import Response
142+
143+
142144
from rest_framework import status
143145

146+
144147
@action(detail=True, methods=["get"])
145148
def sbom(self, request, *args, **kwargs):
146149
project = self.get_object()
147150
purl = request.query_params.get("purl")
148151

149152
if not purl:
150-
return Response({"error": "purl is required"}, status=status.HTTP_400_BAD_REQUEST)
153+
return Response(
154+
{"error": "purl is required"}, status=status.HTTP_400_BAD_REQUEST
155+
)
151156

152-
return Response({
153-
"project": project.name,
154-
"purl": purl,
155-
"sbom": "CycloneDX SBOM will be generated here"
156-
})
157+
return Response(
158+
{
159+
"project": project.name,
160+
"purl": purl,
161+
"sbom": "CycloneDX SBOM will be generated here",
162+
}
163+
)
157164
"""
158165
A viewset that provides the ability to list, get, create, and destroy projects.
159166
Multiple actions are available to manage project instances.

0 commit comments

Comments
 (0)