Skip to content

Loading…

Support colander.drop #154

Closed
abrookins opened this Issue · 0 comments

1 participant

@abrookins

There is a new drop option in Colander that the user can pass as a value for missing= in SchemaNode. For discussion see the original issue. There is also a new addition to the documentation.

Basically missing=colander.drop removes the field from deserialized output if the field value was null.

Cornice doesn't support this behavior automatically because it validates each node of a schema individually. The result is that views using a schema class that has a node set to missing=drop may receive validated/deserialized data with the value of that node set to colander.drop. That's probably not correct, as using the schema object to deserialize the data would have dropped that node from the result.

@almet almet closed this in #155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.