From 709f8e41830a8dc80b72a09d7925df511e5bb5a7 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Thu, 12 Sep 2024 14:33:35 +0200 Subject: [PATCH] add a check for objects that are not able to be adapted to IContentListing --- src/plone/restapi/serializer/summary.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plone/restapi/serializer/summary.py b/src/plone/restapi/serializer/summary.py index a18ed98a8c..8b8c36dc93 100644 --- a/src/plone/restapi/serializer/summary.py +++ b/src/plone/restapi/serializer/summary.py @@ -83,7 +83,10 @@ def __init__(self, context, request): self.blocklisted_attributes = metadata["blocklisted_attributes"] def __call__(self): - obj = IContentListingObject(self.context) + try: + obj = IContentListingObject(self.context) + except TypeError: + return {} summary = {} for field in self.metadata_fields():