fix: meta endpoint to return correct error message

This commit is contained in:
pablohashescobar
2025-02-18 21:04:31 +05:30
parent 76c80ced14
commit 563ca2ff07

View File

@@ -14,9 +14,9 @@ class ProjectMetaDataEndpoint(BaseAPIView):
def get(self, request, anchor):
try:
deploy_board = DeployBoard.objects.filter(
deploy_board = DeployBoard.objects.get(
anchor=anchor, entity_name="project"
).first()
)
except DeployBoard.DoesNotExist:
return Response(
{"error": "Project is not published"}, status=status.HTTP_404_NOT_FOUND