chore: update key value pair

This commit is contained in:
NarayanBavisetti 2024-05-27 17:07:05 +05:30
parent 1cd31f4705
commit a918511b59

View File

@ -146,11 +146,14 @@ class BulkEstimatePointEndpoint(BaseViewSet):
estimate_point.value = estimate_point_data[0].get( estimate_point.value = estimate_point_data[0].get(
"value", estimate_point.value "value", estimate_point.value
) )
estimate_point.key = estimate_point_data[0].get(
"key", estimate_point.key
)
updated_estimate_points.append(estimate_point) updated_estimate_points.append(estimate_point)
EstimatePoint.objects.bulk_update( EstimatePoint.objects.bulk_update(
updated_estimate_points, updated_estimate_points,
["value"], ["key", "value"],
batch_size=10, batch_size=10,
) )