mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: workspace detail on issue activity serializer (#607)
This commit is contained in:
parent
c5ccc29418
commit
3a599b6436
@ -244,6 +244,7 @@ class IssueCreateSerializer(BaseSerializer):
|
|||||||
|
|
||||||
class IssueActivitySerializer(BaseSerializer):
|
class IssueActivitySerializer(BaseSerializer):
|
||||||
actor_detail = UserLiteSerializer(read_only=True, source="actor")
|
actor_detail = UserLiteSerializer(read_only=True, source="actor")
|
||||||
|
workspace_detail = WorkspaceLiteSerializer(read_only=True, source="workspace")
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = IssueActivity
|
model = IssueActivity
|
||||||
|
@ -285,7 +285,7 @@ class IssueActivityEndpoint(BaseAPIView):
|
|||||||
~Q(field="comment"),
|
~Q(field="comment"),
|
||||||
project__project_projectmember__member=self.request.user,
|
project__project_projectmember__member=self.request.user,
|
||||||
)
|
)
|
||||||
.select_related("actor")
|
.select_related("actor", "workspace")
|
||||||
).order_by("created_at")
|
).order_by("created_at")
|
||||||
issue_comments = (
|
issue_comments = (
|
||||||
IssueComment.objects.filter(issue_id=issue_id)
|
IssueComment.objects.filter(issue_id=issue_id)
|
||||||
|
@ -87,7 +87,7 @@ class UserActivityEndpoint(BaseAPIView, BasePaginator):
|
|||||||
def get(self, request):
|
def get(self, request):
|
||||||
try:
|
try:
|
||||||
queryset = IssueActivity.objects.filter(actor=request.user).select_related(
|
queryset = IssueActivity.objects.filter(actor=request.user).select_related(
|
||||||
"actor"
|
"actor", "workspace"
|
||||||
)
|
)
|
||||||
|
|
||||||
return self.paginate(
|
return self.paginate(
|
||||||
|
Loading…
Reference in New Issue
Block a user