Skip to content

Commit

Permalink
add a check for objects that are not able to be adapted to IContentLi…
Browse files Browse the repository at this point in the history
…sting
  • Loading branch information
erral committed Sep 12, 2024
1 parent 849723a commit 709f8e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plone/restapi/serializer/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 709f8e4

Please sign in to comment.