Skip to content

Commit

Permalink
Support for node.utils.Unset.
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Aug 24, 2024
1 parent e236bed commit 9caa34c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plone/restapi/serializer/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ def json_compatible(value, context=None):
@adapter(Interface)
@implementer(IJsonCompatible)
def default_converter(value):
if value is None:
return value
if value is None or repr(value) == "<UNSET>":
# None or node.utils.Unset
return None

if type(value) in (six.text_type, bool, int, float, int):
return value
Expand Down

0 comments on commit 9caa34c

Please sign in to comment.