Serializer validation ignore "required=False" in nested serializer on 3.14 -> 3.15.1 update #9420
-
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. |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
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.