feat: return workspace and project details in estimate endpoints (#1009)

This commit is contained in:
pablohashescobar 2023-05-05 15:12:22 +05:30 committed by GitHub
parent 5b0dc43bae
commit 336220bd98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -53,7 +53,7 @@ class BulkEstimatePointEndpoint(BaseViewSet):
try:
estimates = Estimate.objects.filter(
workspace__slug=slug, project_id=project_id
).prefetch_related("points")
).prefetch_related("points").select_related("workspace", "project")
serializer = EstimateReadSerializer(estimates, many=True)
return Response(serializer.data, status=status.HTTP_200_OK)
except Exception as e: