Skip to content

Commit 584a1aa

Browse files
authored
fix: PATCH endpoint project estimate validation (#7872)
1 parent 1e1520b commit 584a1aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/api/plane/api/serializers/project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from .base import BaseSerializer
1818

1919

20-
class ProjectCreateSerializer(BaseSerializer):
20+
class ProjectCreateSerializer(BaseSerializer):
2121
"""
2222
Serializer for creating projects with workspace validation.
2323
@@ -171,7 +171,7 @@ def update(self, instance, validated_data):
171171

172172
if (
173173
validated_data.get("estimate", None) is not None
174-
and not Estimate.objects.filter(project=instance, id=validated_data.get("estimate")).exists()
174+
and not Estimate.objects.filter(project=instance, id=validated_data.get("estimate").id).exists()
175175
):
176176
# Check if the estimate is a estimate in the project
177177
raise serializers.ValidationError("Estimate should be a estimate in the project")

0 commit comments

Comments
 (0)