feat: project member role (#1828)
This commit is contained in:
parent
0a1483c482
commit
be86a7d38e
2 changed files with 7 additions and 0 deletions
|
|
@ -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()
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue