heynemann / motorengine

Motorengine is a port of MongoEngine for Tornado.
http://motorengine.readthedocs.org
204 stars 67 forks source link

Unexpected behaviour of validate() in BinaryField, DecimalField and UrlField #130

Open steven266 opened 6 years ago

steven266 commented 6 years ago

Hello,

I recently started using MotorEngine and quickly came up with a strange behaviour of the validate function in certain Fields. If required is False then validate should allow None as a valid value.

I added a fix for BinaryField, DecimalField and UrlField and would be glad if this fix could be merged back into the original project.

Best regards, Steven

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 95.211% when pulling 16703e8df351b9f5c702459264f20c8bce1bb9d8 on steven266:master into 5e1fea7cc15060f768a697fe4c3593d20f23c4ed on heynemann:master.

sourcepirate commented 6 years ago

+1