Skip to content

#7703 Note edge case compatibility break in 3.10.x #7834

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

Closed
wants to merge 1 commit into from

Conversation

Syntaf
Copy link

@Syntaf Syntaf commented Mar 12, 2021

Short Summary: Adds a warning about a possible backwards compatibility break where fields having source='*' receiving values of None would now pass that None through the fields validation.

Tag-along PR to #7703 which improves 3.10.x release notes - explained in more detail here #7716 (comment)

@tomchristie
Copy link
Member

I'm going to close this off, since I can't understand the wording in this change.
Perhaps there's something here that's worth starting a discussion on first?

@Syntaf
Copy link
Author

Syntaf commented Mar 12, 2021

Fair enough, I did mention in that comment that it's a rare edge case so no harm in closing this.

The basis of the compatibility break was that previous to 3.10.X, values of None passed into fields with source='*' skipped all validation.

This change however meant that from 3.10.X on, validation will always be ran on these fields regardless of value.

As a result, we had some CharField(source='*', allow_null=True) fields stop working after upgrading to 3.10.X because even with allow_null, None is passed through validation and thus fails where it previously didn't.

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

Successfully merging this pull request may close these issues.

2 participants