Skip to content

Serializer validation ignore "required=False" in nested serializer on 3.14 -> 3.15.1 update #9420

Discussion options

You must be logged in to vote

update:
it seems that I now have a UniqueTogetherValidator that discard my "required=False".

This UniqueTogetherValidator exists because of my model definition:

class Meta:
    constraints = [models.UniqueConstraint(fields=["my_field", "some_other_field"],name="name")]

If I remember correctly, in 3.14 UniqueConstraint did not create UniqueTogetherValidator automatically, now It does and thus it fails.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Jeanbouvatt
Comment options

Answer selected by Jeanbouvatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant