Skip to content

Commit

Permalink
corrected message error on front when conflicting parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
melinoix committed Sep 25, 2024
1 parent 6c33ccd commit 7736b1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/core/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def create(self, validated_data: Any):
try:
object_created = super().create(validated_data)
return object_created
except Exception as e:
except ValidationError as e:
logger.error(e)
raise serializers.ValidationError()
raise serializers.ValidationError(e.args[0])

class Meta:
model: models.Model
Expand Down

0 comments on commit 7736b1d

Please sign in to comment.