Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when serializing a Collection that includes Events with recurrences #1809

Open
erral opened this issue Sep 12, 2024 · 0 comments · May be fixed by #1810 or #1811
Open

Error when serializing a Collection that includes Events with recurrences #1809

erral opened this issue Sep 12, 2024 · 0 comments · May be fixed by #1810 or #1811

Comments

@erral
Copy link
Sponsor Member

erral commented Sep 12, 2024

When you list events in a Collection, and try to serialize it through the REST API, you get the following error

{
  "message": "('Could not adapt', <Occurrence at /Plone/eu/agenda/pentsio-duinak-eskatzeko-elkarretaratzea/2024-09-16>, <InterfaceClass plone.app.contentlisting.interfaces.IContentListingObject>)",
  "type": "TypeError"
}

The point is that plone.app.event's Ocurrence objects are not IContentish and thus are not adaptable to IContentListingObject, so this line breaks.

The solution on plone.restapi's side should be to defensively call IContentListingObject and in plone.app.event's side to define an adapter for IContentListingObject.

PRs to come

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant