You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I deserialize a dictionary containing None as value for a boolean node, Colander falls back to True, which is absolutely wrong... a default for a boolean must always be False by definition.
I currently subclassed Boolean in this way to make it work as expected:
class SmartBoolean(Boolean):
def deserialize(self, node, cstruct):
if cstruct in (null, None, ''):
return null
return super().deserialize(node, cstruct)
But I hope you will consider to replace True with False in the last line of original Booleandeserialize() method. Thanks!
sbivol, CasperLA, antoineleclair, ohadperry and dmegbert