fix reacreate of bookingReferences when rescheduling (#2272)
Co-authored-by: Omar López <zomars@me.com>pull/2278/head
parent
296697370d
commit
92534c7e6d
|
@ -636,7 +636,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
})
|
||||
);
|
||||
await Promise.all(promises);
|
||||
|
||||
// Avoid passing referencesToCreate with id unique constrain values
|
||||
await prisma.booking.update({
|
||||
where: {
|
||||
uid: booking.uid,
|
||||
|
|
|
@ -176,8 +176,9 @@ export default class EventManager {
|
|||
select: {
|
||||
id: true,
|
||||
references: {
|
||||
// NOTE: id field removed from select as we don't require for deletingMany
|
||||
// but was giving error on recreate for reschedule, probably because promise.all() didn't finished
|
||||
select: {
|
||||
id: true,
|
||||
type: true,
|
||||
uid: true,
|
||||
meetingId: true,
|
||||
|
|
Loading…
Reference in New Issue