From 1bf1b63fffa86524538542e303246d715f5b394d Mon Sep 17 00:00:00 2001 From: pablohashescobar <118773738+pablohashescobar@users.noreply.github.com> Date: Fri, 5 May 2023 15:12:38 +0530 Subject: [PATCH] fix: estimate points update (#1003) * fix: estimate points hub * fix: estimate points update * fix: estimate points bulk_update --- apiserver/plane/api/views/estimate.py | 4 ++-- apiserver/plane/db/models/estimate.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/apiserver/plane/api/views/estimate.py b/apiserver/plane/api/views/estimate.py index 49c3ba2d0..68de54d7a 100644 --- a/apiserver/plane/api/views/estimate.py +++ b/apiserver/plane/api/views/estimate.py @@ -57,7 +57,7 @@ class BulkEstimatePointEndpoint(BaseViewSet): serializer = EstimateReadSerializer(estimates, many=True) return Response(serializer.data, status=status.HTTP_200_OK) except Exception as e: - print(e) + capture_exception(e) return Response( {"error": "Something went wrong please try again later"}, status=status.HTTP_400_BAD_REQUEST, @@ -211,7 +211,7 @@ class BulkEstimatePointEndpoint(BaseViewSet): try: EstimatePoint.objects.bulk_update( - updated_estimate_points, ["value"], batch_size=10 + updated_estimate_points, ["value"], batch_size=10, ) except IntegrityError as e: return Response( diff --git a/apiserver/plane/db/models/estimate.py b/apiserver/plane/db/models/estimate.py index f163a1407..d95a86316 100644 --- a/apiserver/plane/db/models/estimate.py +++ b/apiserver/plane/db/models/estimate.py @@ -39,7 +39,6 @@ class EstimatePoint(ProjectBaseModel): return f"{self.estimate.name} <{self.key}> <{self.value}>" class Meta: - unique_together = ["value", "estimate"] verbose_name = "Estimate Point" verbose_name_plural = "Estimate Points" db_table = "estimate_points"