mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
Merge branch 'chore/project-entities' of github.com:makeplane/plane into chore/project-entities
This commit is contained in:
commit
64fcb532fc
@ -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":
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user