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

NumberWidget.render() returns None as string #1650

Conversation

matthewhegarty
Copy link
Contributor

@matthewhegarty matthewhegarty commented Oct 4, 2023

Problem

NumberWidget.render() returns 'None' as string if value is None and coerce to string is set.

Solution

Add specific check for this

Acceptance Criteria

Test added.

@coveralls
Copy link

coveralls commented Oct 4, 2023

Coverage Status

coverage: 100.0%. remained the same when pulling 315c97a on matthewhegarty:number-widget-coerce-to-string into 77d659d on django-import-export:main.

@matthewhegarty matthewhegarty marked this pull request as ready for review October 5, 2023 09:57
Copy link

@pokken-magic pokken-magic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. All this consistency in handling nulls should be really useful

@matthewhegarty
Copy link
Contributor Author

Thanks for reviewing. There is some way to go to introduce consistency because of the quirks that have evolved over the last decade, but we are moving in the right direction.

@matthewhegarty matthewhegarty merged commit 9dee0b3 into django-import-export:main Oct 5, 2023
11 checks passed
@matthewhegarty matthewhegarty deleted the number-widget-coerce-to-string branch October 5, 2023 11:22
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.

None yet

3 participants