fix: Getting an error with managed events when accessing through api/v1 (#18683)
* fix: getting error with managed events when get through api/v1 * update
This commit is contained in:
1 parent
fa3b1c17ea
commit
be2e1274ff
1 file changed
+2
-2
@@ -7,7 +7,7 @@ import { getTranslation } from "@calcom/lib/server/i18n";
|
|||||||
import type { PrismaClient } from "@calcom/prisma";
|
import type { PrismaClient } from "@calcom/prisma";
|
||||||
import { SchedulingType } from "@calcom/prisma/enums";
|
import { SchedulingType } from "@calcom/prisma/enums";
|
||||||
import { _EventTypeModel } from "@calcom/prisma/zod";
|
import { _EventTypeModel } from "@calcom/prisma/zod";
|
||||||
import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
|
import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";
|
||||||
import { allManagedEventTypeProps, unlockedManagedEventTypeProps } from "@calcom/prisma/zod-utils";
|
import { allManagedEventTypeProps, unlockedManagedEventTypeProps } from "@calcom/prisma/zod-utils";
|
||||||
|
|
||||||
interface handleChildrenEventTypesProps {
|
interface handleChildrenEventTypesProps {
|
||||||
@@ -240,7 +240,7 @@ export default async function handleChildrenEventTypes({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const metadata = EventTypeMetaDataSchema.parse(existingEventType?.metadata || {});
|
const metadata = eventTypeMetaDataSchemaWithTypedApps.parse(existingEventType?.metadata || {});
|
||||||
|
|
||||||
return await prisma.eventType.update({
|
return await prisma.eventType.update({
|
||||||
where: {
|
where: {
|
||||||
|
|||||||
Reference in new issue
Block a user