-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Resolve empty HTML charfield behavior. #3321
Conversation
@@ -385,8 +385,10 @@ def get_value(self, dictionary): | |||
# If the field is blank, and null is a valid value then | |||
# determine if we should use null instead. | |||
return '' if getattr(self, 'allow_blank', False) else None | |||
elif ret == '' and self.default: | |||
return empty | |||
elif ret == '' and not self.required: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could add a link to the two bugs that lead to this test ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll link to the tests around CharField behaviors, yup. Lemme wait til we have a tagged version to point at.
Resolve empty HTML charfield behavior.
Closes #3318.