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

Remove support for assigning None to a SplitField #614

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

mthuurne
Copy link
Contributor

This behavior wasn't documented and didn't fully work: it breaks as soon as you try to save a model with a None value.

I think removing None support is better than making it work:

  • to make it work properly, it would have to respect the null constructor argument both in the implementation and in the type checking, which is a lot of work
  • the Django docs recommend against using null=True for text fields, so the value of the feature is questionable

As it was an undocumented feature that only partially worked, I think this change doesn't break backwards compatibility, so I didn't add it to the ChangeLog.

This behavior wasn't documented and didn't fully work: it breaks
as soon as you try to save a model with a `None` value.
@mthuurne mthuurne mentioned this pull request Apr 16, 2024
@foarsitter
Copy link
Contributor

With 73,057 Downloads last day* you are at least breaking someones code. But since it is undocumented and not working properly I'm not against it.

*https://pypistats.org/packages/django-model-utils

@mthuurne
Copy link
Contributor Author

Does that mean the PR is fine as it is or should I add a line to the ChangeLog?

@foarsitter
Copy link
Contributor

That is up to you, I don't have an opinion on this one.

@foarsitter
Copy link
Contributor

@gmcrocetti what is your opinion on this one?

@mthuurne mthuurne mentioned this pull request Jun 12, 2024
@foarsitter foarsitter merged commit 4275f84 into jazzband:master Jun 13, 2024
7 checks passed
@mthuurne mthuurne deleted the splitfield-notnone branch June 13, 2024 10:02
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