feat: project member role (#1828)

This commit is contained in:
Nikhil 2023-08-11 12:46:29 +05:30 committed by GitHub
parent 0a1483c482
commit be86a7d38e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -110,6 +110,12 @@ class ProjectViewSet(BaseViewSet):
.annotate(count=Func(F("id"), function="Count"))
.values("count")
)
.annotate(
member_role=ProjectMember.objects.filter(
project_id=OuterRef("pk"),
member_id=self.request.user.id,
).values("role")
)
.distinct()
)