geonature.core.gn_permissions.schemas¶
Classes¶
Marchmallow-sqlalchemy behavior is to search object in database, |
|
Module Contents¶
- class geonature.core.gn_permissions.schemas.PermActionSchema[source]¶
Bases:
geonature.utils.env.ma.SQLAlchemyAutoSchema
- class geonature.core.gn_permissions.schemas.PermObjectSchema[source]¶
Bases:
geonature.utils.env.ma.SQLAlchemyAutoSchema
- class geonature.core.gn_permissions.schemas.PermissionSchema[source]¶
Bases:
utils_flask_sqla.schema.SmartRelationshipsMixin
,geonature.utils.env.ma.SQLAlchemyAutoSchema
Marchmallow-sqlalchemy behavior is to search object in database, and if not found, to create a new one. As this schema is not means to create any related object, nested fields are dump only (use the FK to set the value). For m2m fields, as it is not possible to load the FK which is in another table, we let the user provide m2m models PK, but we have validation hooks which verify that related models exists and have not been created by marchmallow-sqlalchemy.