fix: Fix 'Book a new time' link in request-reschedule for Team Event (#12261)
Co-authored-by: Carina Wollendorfer <[email protected]> Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
19 files changed
+510
-48
No files matched your search
@@ -12,6 +12,7 @@ vi.mock("@calcom/prisma", () => ({
|
||||
|
||||
const handlePrismockBugs = () => {
|
||||
const __updateBooking = prismock.booking.update;
|
||||
const __findFirstOrThrowBooking = prismock.booking.findFirstOrThrow;
|
||||
const __findManyWebhook = prismock.webhook.findMany;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
prismock.booking.update = (...rest: any[]) => {
|
||||
@@ -34,6 +35,14 @@ const handlePrismockBugs = () => {
|
||||
return __updateBooking(...rest);
|
||||
};
|
||||
|
||||
prismock.booking.findFirstOrThrow = (...rest: any[]) => {
|
||||
const { where } = rest[0];
|
||||
delete where.NOT;
|
||||
logger.silly("Fixed Prismock bug with using NOT in where clause");
|
||||
|
||||
return __findFirstOrThrowBooking(...rest);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
prismock.webhook.findMany = (...rest: any[]) => {
|
||||
// There is some bug in prismock where it can't handle complex where clauses
|
||||
|
||||
Reference in new issue
Block a user