Skip to content

Commit

Permalink
fix: add score field in validation error to handle front error display
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Apr 26, 2024
1 parent 9be252d commit a946801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/core/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def validate_score(self, value):
if value is not None:
if value < framework.min_score or value > framework.max_score:
raise serializers.ValidationError(
f"Score must be between {framework.min_score} and {framework.max_score}"
{"score": f"Score must be between {framework.min_score} and {framework.max_score}"}
)
return value

Expand Down

0 comments on commit a946801

Please sign in to comment.