Repository navigation
Serializer validation ignore "required=False" in nested serializer on 3.14 -> 3.15.1 update #9420
Answered
by
Jeanbouvatt
Jeanbouvatt
asked this question in
Potential Issue
|
I have a pretty huge serializer, which, upon creation, relies on a nested serializer. which seems good when inspecting the serializer: but... "Ce champ est obligatoire.'" being the french default error message for a required field not provided. My code was working as intended, but when updating from 3.14 to 3.15.1 (doing so to use python3.12), it began to fail. Any Idea? It very much looks like a regression. |
Answered by
Jeanbouvatt
May 30, 2024
Replies: 1 comment 2 replies
|
update: This UniqueTogetherValidator exists because of my model definition: If I remember correctly, in 3.14 UniqueConstraint did not create UniqueTogetherValidator automatically, now It does and thus it fails. |
2 replies
Answer selected by
Jeanbouvatt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update:
it seems that I now have a UniqueTogetherValidator that discard my "required=False".
This UniqueTogetherValidator exists because of my model definition:
If I remember correctly, in 3.14 UniqueConstraint did not create UniqueTogetherValidator automatically, now It does and thus it fails.