mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: fixed workspace list
This commit is contained in:
parent
4101a92f2e
commit
3da5817629
@ -2,7 +2,7 @@
|
||||
from rest_framework import serializers
|
||||
|
||||
# Module imports
|
||||
from .base import BaseSerializer
|
||||
from .base import BaseSerializer, DynamicBaseSerializer
|
||||
from .user import UserLiteSerializer, UserAdminLiteSerializer
|
||||
|
||||
from plane.db.models import (
|
||||
@ -16,7 +16,7 @@ from plane.db.models import (
|
||||
)
|
||||
|
||||
|
||||
class WorkSpaceSerializer(BaseSerializer):
|
||||
class WorkSpaceSerializer(DynamicBaseSerializer):
|
||||
owner = UserLiteSerializer(read_only=True)
|
||||
total_members = serializers.IntegerField(read_only=True)
|
||||
total_issues = serializers.IntegerField(read_only=True)
|
||||
|
@ -214,7 +214,7 @@ class UserWorkSpacesEndpoint(BaseAPIView):
|
||||
fields=fields if fields else None,
|
||||
many=True,
|
||||
).data
|
||||
workspace_dict = {str(workspaces["id"]): workspaces for workspace in workspaces}
|
||||
workspace_dict = {str(workspace["id"]): workspace for workspace in workspaces}
|
||||
return Response(workspace_dict, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user