fix: project deactivated users

This commit is contained in:
NarayanBavisetti 2024-03-25 09:58:14 +05:30
parent 31b2fa2c14
commit 2def433b18
3 changed files with 4 additions and 4 deletions

View File

@ -179,7 +179,7 @@ class ProjectMemberAdminSerializer(BaseSerializer):
class ProjectMemberRoleSerializer(DynamicBaseSerializer):
class Meta:
model = ProjectMember
fields = ("id", "role", "member", "project")
fields = ("id", "role", "member", "project", "is_active")
class ProjectMemberInviteSerializer(BaseSerializer):

View File

@ -157,7 +157,7 @@ class ProjectMemberViewSet(BaseViewSet):
).select_related("project", "member", "workspace")
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)

View File

@ -90,13 +90,13 @@ class WorkSpaceMemberViewSet(BaseViewSet):
if workspace_member.role > 10:
serializer = WorkspaceMemberAdminSerializer(
workspace_members,
fields=("id", "member", "role"),
fields=("id", "member", "role", "is_active"),
many=True,
)
else:
serializer = WorkSpaceMemberSerializer(
workspace_members,
fields=("id", "member", "role"),
fields=("id", "member", "role", "is_active"),
many=True,
)
return Response(serializer.data, status=status.HTTP_200_OK)