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
Hi @stevepiercy@jensens
we still use version 7.x to create AT content on some applications and we encounter a bug: it is possible to create an empty content without required fields by just giving the "portal_type".
This is because in https://github.com/plone/plone.restapi/blob/7.x.x/src/plone/restapi/deserializer/atcontent.py#L55
In DeserializeFromJson, validation is only done if a field was modified, this is not the case and it fails.
Changing if modified: by if create or modified: fix the problem.
I will propose a PR for this.
Thank you,
Gauthier
The text was updated successfully, but these errors were encountered:
Hi @stevepiercy @jensens
we still use version 7.x to create AT content on some applications and we encounter a bug: it is possible to create an empty content without required fields by just giving the "portal_type".
This is because in https://github.com/plone/plone.restapi/blob/7.x.x/src/plone/restapi/deserializer/atcontent.py#L55
In DeserializeFromJson, validation is only done if a field was modified, this is not the case and it fails.
Changing
if modified:
byif create or modified:
fix the problem.I will propose a PR for this.
Thank you,
Gauthier
The text was updated successfully, but these errors were encountered: