Skip to content

Conversation

laishulu
Copy link

Currently, if number field is None, an exception will be raised.
So there's no way to make the number field nullable.

Copy link
Owner

Choose a reason for hiding this comment

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

It is better to add import types to the top, and use if isinstance(value, (self.number_type, types.NoneType)): instead of if isinstance(value, self.number_type) or value is None:.

@svetlyak40wt
Copy link
Owner

Thank you for contribution, but I lack of time to maintain this project. If you wish, I'll grant you access to this repository, so you'll be able to merge you patch yourself. But please, squash commits into one, add a meaningful commit description and write a test for this improvement.

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