forked from github/plane
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):
|
||||
actor_detail = UserLiteSerializer(read_only=True, source="actor")
|
||||
workspace_detail = WorkspaceLiteSerializer(read_only=True, source="workspace")
|
||||
|
||||
class Meta:
|
||||
model = IssueActivity
|
||||
|
@ -285,7 +285,7 @@ class IssueActivityEndpoint(BaseAPIView):
|
||||
~Q(field="comment"),
|
||||
project__project_projectmember__member=self.request.user,
|
||||
)
|
||||
.select_related("actor")
|
||||
.select_related("actor", "workspace")
|
||||
).order_by("created_at")
|
||||
issue_comments = (
|
||||
IssueComment.objects.filter(issue_id=issue_id)
|
||||
|
@ -87,7 +87,7 @@ class UserActivityEndpoint(BaseAPIView, BasePaginator):
|
||||
def get(self, request):
|
||||
try:
|
||||
queryset = IssueActivity.objects.filter(actor=request.user).select_related(
|
||||
"actor"
|
||||
"actor", "workspace"
|
||||
)
|
||||
|
||||
return self.paginate(
|
||||
|
Loading…
Reference in New Issue
Block a user