fix reacreate of bookingReferences when rescheduling (#2272)
Co-authored-by: Omar López <zomars@me.com>
This commit is contained in:
		
							parent
							
								
									296697370d
								
							
						
					
					
						commit
						92534c7e6d
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		|  | @ -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 a new issue
	
	 alannnc
						alannnc