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 Dec 17, 2024
1 parent 40a399f commit 13b540d
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 @@ -71,8 +71,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 (str, bool, int, float, int):
return value
Expand Down

0 comments on commit 13b540d

Please sign in to comment.