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
Consider removing marshmallow mixin from pony entities, and instead use pony own argument selector e.g. to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4']).
Currently we sanitize user input using marshmallow schema via mixin to pony entity. It need not be actually, because we can incorporate simple schema inside pony model. Thus making entity definition also contains json schema and validate user input by utilizing built-in before_insert method.
The text was updated successfully, but these errors were encountered:
xakiy
changed the title
Consider removing mixin from entities, and use pony own to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4'])
Consider removing marshmallow mixin from pony entities, and instead use pony own argument selector e.g. to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4'])
Feb 11, 2020
xakiy
changed the title
Consider removing marshmallow mixin from pony entities, and instead use pony own argument selector e.g. to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4'])
Consider removing marshmallow mixin from pony entities
Feb 11, 2020
Consider removing marshmallow mixin from pony entities, and instead use pony own argument selector e.g. to_dict(exclude={'attr1', 'attr2']) or to_dict(only=['attr3', 'attr4']).
Currently we sanitize user input using marshmallow schema via mixin to pony entity. It need not be actually, because we can incorporate simple schema inside pony model. Thus making entity definition also contains json schema and validate user input by utilizing built-in before_insert method.
The text was updated successfully, but these errors were encountered: