Skip to content

Commit

Permalink
fix: metadata get lost when rescheduling (#7873)
Browse files Browse the repository at this point in the history
  • Loading branch information
G3root authored Mar 22, 2023
1 parent 79f7a16 commit e4eb21b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/features/bookings/lib/handleNewBooking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,9 @@ async function handler(
newBookingData.recurringEventId = reqBody.recurringEventId;
}
if (originalRescheduledBooking) {
newBookingData.metadata = {
...(typeof originalRescheduledBooking.metadata === "object" && originalRescheduledBooking.metadata),
};
newBookingData["paid"] = originalRescheduledBooking.paid;
newBookingData["fromReschedule"] = originalRescheduledBooking.uid;
if (newBookingData.attendees?.createMany?.data) {
Expand Down

0 comments on commit e4eb21b

Please sign in to comment.