chore: update the endpoint to return last 6 months data (#453)

This commit is contained in:
pablohashescobar 2023-03-22 01:32:51 +05:30 committed by GitHub
parent e5f8c94de8
commit 7fd775ab05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -591,7 +591,7 @@ class UserActivityGraphEndpoint(BaseAPIView):
IssueActivity.objects.filter( IssueActivity.objects.filter(
actor=request.user, actor=request.user,
workspace__slug=slug, workspace__slug=slug,
created_at__date__gte=date.today() + relativedelta(months=-3), created_at__date__gte=date.today() + relativedelta(months=-6),
) )
.annotate(created_date=Cast("created_at", DateField())) .annotate(created_date=Cast("created_at", DateField()))
.values("created_date") .values("created_date")