[WEB-5044] fix: ruff lint and format errors (#7868)

* fix: lint errors

* fix: file formatting

* fix: code refactor
This commit is contained in:
sriram veeraghanta 2025-09-29 19:15:32 +05:30 committed by GitHub
parent 1fb22bd252
commit 9237f568dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
261 changed files with 2199 additions and 6378 deletions

View file

@ -65,9 +65,7 @@ class ServiceApiTokenEndpoint(BaseAPIView):
def post(self, request: Request, slug: str) -> Response:
workspace = Workspace.objects.get(slug=slug)
api_token = APIToken.objects.filter(
workspace=workspace, is_service=True
).first()
api_token = APIToken.objects.filter(workspace=workspace, is_service=True).first()
if api_token:
return Response({"token": str(api_token.token)}, status=status.HTTP_200_OK)
@ -83,6 +81,4 @@ class ServiceApiTokenEndpoint(BaseAPIView):
user_type=user_type,
is_service=True,
)
return Response(
{"token": str(api_token.token)}, status=status.HTTP_201_CREATED
)
return Response({"token": str(api_token.token)}, status=status.HTTP_201_CREATED)