culturecreates / footlight-app

Footlight CMS Front-end
https://cms.footlight.io
3 stars 0 forks source link

NAC Osaka prod calendar - duplicate event bug #1453

Open troughc opened 1 day ago

troughc commented 1 day ago

This seems to only be an issue in the NAC Osaka prod calendar. When I try to duplicate an event, I get an error message. Steps to reproduce In list view, click to open the menu next to an event and chose duplicate event. The event form opens. Click save as draft. This error appears: Image

AbhishekPAnil commented 1 day ago

Bug Report: An error was triggered by the backend when attempting to save an event as a draft.

The payload for creating the event included: "organizers": [{"type": "Organization"}] The organizers field was missing an entityId.

This issue occurred because the event being duplicated also had an organizer without an entityId: Event Link This event may also have the same issue : https://staging.cms.footlight.io/dashboard/66fa7b17eb00ea006325fc46/events/67377033ad60100064a3d351

To resolve this, I have added an additional check in the frontend to remove any organizer, person, or supporter without an entityId. This ensures that the payload for event creation or updates does not include any organizers, persons, or supporters lacking an entityId.

@sahalali I am assigning this to you,to make the correction in the Backend.