Fix rescheduling updating calendars & duplicate bookings (#7851)
* Fix rescheduling * Fix tests * Clean up * Update packages/core/EventManager.ts Co-authored-by: Syed Ali Shahbaz <[email protected]> * Commit fix --------- Co-authored-by: Syed Ali Shahbaz <[email protected]> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
2 files changed
+4
-7
No files matched your search
@@ -439,12 +439,9 @@ export default class EventManager {
|
||||
});
|
||||
}
|
||||
|
||||
if (newBooking) {
|
||||
calendarReference = newBooking.references.find((reference) => reference.type.includes("_calendar"));
|
||||
} else {
|
||||
// Bookings should only have one calendar reference
|
||||
calendarReference = booking.references.find((reference) => reference.type.includes("_calendar"));
|
||||
}
|
||||
calendarReference = newBooking?.references.length
|
||||
? newBooking.references.find((reference) => reference.type.includes("_calendar"))
|
||||
: booking.references.find((reference) => reference.type.includes("_calendar"));
|
||||
|
||||
if (!calendarReference) {
|
||||
return [];
|
||||
|
||||
Reference in new issue
Block a user