chore: return assignee avatars when x axis in assignee_email (#1049)

This commit is contained in:
pablohashescobar 2023-05-15 19:38:08 +05:30 committed by GitHub
parent 7b52fb885d
commit 8d6082183e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,11 +76,17 @@ class AnalyticsEndpoint(BaseAPIView):
) )
) )
assignee_avatars = {}
if x_axis in ["assignees__email"]:
assignee_avatars = Issue.objects.filter(
workspace__slug=slug, **filters
).values("assignees__avatar")
return Response( return Response(
{ {
"total": total_issues, "total": total_issues,
"distribution": distribution, "distribution": distribution,
"extras": {"colors": colors}, "extras": {"colors": colors, "assignee_avatars": assignee_avatars},
}, },
status=status.HTTP_200_OK, status=status.HTTP_200_OK,
) )