Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
Deal when the input parameter is None and the field is not required
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon Navarro Bosch committed Jan 8, 2017
1 parent a88efd2 commit 32c6c7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plone.server/plone/server/json/deserialize_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ def set_schema(

if behavior:
data_value = data[schema.__identifier__][name] if name in data[schema.__identifier__] else None # noqa
found = True if name in data[schema.__identifier__] else False
else:
data_value = data[name] if name in data else None
found = True if name in data else False

f = schema.get(name)
if data_value is not None:
if found:

if not self.check_permission(write_permissions.get(name)):
continue
Expand Down

0 comments on commit 32c6c7c

Please sign in to comment.