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 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):

View File

@ -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)

View File

@ -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)