mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: project deactivated users
This commit is contained in:
parent
31b2fa2c14
commit
2def433b18
@ -179,7 +179,7 @@ class ProjectMemberAdminSerializer(BaseSerializer):
|
|||||||
class ProjectMemberRoleSerializer(DynamicBaseSerializer):
|
class ProjectMemberRoleSerializer(DynamicBaseSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = ProjectMember
|
model = ProjectMember
|
||||||
fields = ("id", "role", "member", "project")
|
fields = ("id", "role", "member", "project", "is_active")
|
||||||
|
|
||||||
|
|
||||||
class ProjectMemberInviteSerializer(BaseSerializer):
|
class ProjectMemberInviteSerializer(BaseSerializer):
|
||||||
|
@ -157,7 +157,7 @@ class ProjectMemberViewSet(BaseViewSet):
|
|||||||
).select_related("project", "member", "workspace")
|
).select_related("project", "member", "workspace")
|
||||||
|
|
||||||
serializer = ProjectMemberRoleSerializer(
|
serializer = ProjectMemberRoleSerializer(
|
||||||
project_members, fields=("id", "member", "role"), many=True
|
project_members, fields=("id", "member", "role", "is_active"), many=True
|
||||||
)
|
)
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||||
|
|
||||||
|
@ -90,13 +90,13 @@ class WorkSpaceMemberViewSet(BaseViewSet):
|
|||||||
if workspace_member.role > 10:
|
if workspace_member.role > 10:
|
||||||
serializer = WorkspaceMemberAdminSerializer(
|
serializer = WorkspaceMemberAdminSerializer(
|
||||||
workspace_members,
|
workspace_members,
|
||||||
fields=("id", "member", "role"),
|
fields=("id", "member", "role", "is_active"),
|
||||||
many=True,
|
many=True,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
serializer = WorkSpaceMemberSerializer(
|
serializer = WorkSpaceMemberSerializer(
|
||||||
workspace_members,
|
workspace_members,
|
||||||
fields=("id", "member", "role"),
|
fields=("id", "member", "role", "is_active"),
|
||||||
many=True,
|
many=True,
|
||||||
)
|
)
|
||||||
return Response(serializer.data, status=status.HTTP_200_OK)
|
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||||
|
Loading…
Reference in New Issue
Block a user