Merge branch 'chore/project-entities' of github.com:makeplane/plane into chore/project-entities

This commit is contained in:
Rahul R 2024-01-22 14:12:49 +05:30
commit 64fcb532fc
2 changed files with 21 additions and 3 deletions

View File

@ -49,8 +49,18 @@ class StateViewSet(BaseViewSet):
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
def list(self, request, slug, project_id): def list(self, request, slug, project_id):
states = State.objects.filter(workspace__slug=slug, project_id=project_id).values( states = State.objects.filter(
"id", "project_id", "workspace__slug", "name", "color", "group" workspace__slug=slug, project_id=project_id
).values(
"id",
"project_id",
"workspace__slug",
"name",
"color",
"group",
"default",
"description",
"sequence",
) )
grouped = request.GET.get("grouped", False) grouped = request.GET.get("grouped", False)
if grouped == "true": if grouped == "true":

View File

@ -1469,7 +1469,15 @@ class WorkspaceStatesEndpoint(BaseAPIView):
workspace__slug=slug, workspace__slug=slug,
project__project_projectmember__member=request.user, project__project_projectmember__member=request.user,
).values( ).values(
"id", "project_id", "workspace__slug", "name", "color", "group" "id",
"project_id",
"workspace__slug",
"name",
"color",
"group",
"default",
"description",
"sequence",
) )
return Response(states, status=status.HTTP_200_OK) return Response(states, status=status.HTTP_200_OK)