Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.15 is raising required error on model nullable fields #9378

Open
Enorio opened this issue Apr 11, 2024 · 1 comment
Open

3.15 is raising required error on model nullable fields #9378

Enorio opened this issue Apr 11, 2024 · 1 comment

Comments

@Enorio
Copy link

Enorio commented Apr 11, 2024

I have a model with nullable fields. Upgrading from 3.14 to 3.15 I'm getting this error:
AssertionError: You cannot call .save() on a serializer with invalid data.

When I print the serializer.errors after serializer.is_valid(), it says those fields are required. Is it possible that this is a bug, or do I have to manually override the field in the serializer to have the required=False kwarg?

@sevdog
Copy link
Contributor

sevdog commented Apr 23, 2024

Could you provide a code sample of your model, serializer and data for checking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants