fix: Can't change availability for managed event type (#19006)

* fix: flaky test organization.spec

* fix
This commit is contained in:
Anik Dhabal Babu authored and GitHub committed 2025-02-17 13:59:39 +00:00
1 parent 14bba343a4
commit 63d26c4fba
2 files changed
+2 -1

No files matched your search

@@ -252,6 +252,7 @@ export default async function handleChildrenEventTypes({
data: {
...updatePayloadFiltered,
hidden: children?.find((ch) => ch.owner.id === userId)?.hidden ?? false,
...(eventType.scheduleId ? { schedule: { connect: { id: eventType.scheduleId } } } : {}),
hashedLink:
"multiplePrivateLinks" in unlockedFieldProps
? undefined
@@ -260,7 +260,7 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
}
}
// allows unsetting a schedule through { schedule: null, ... }
else if (null === schedule) {
else if (null === schedule || schedule === 0) {
data.schedule = {
disconnect: true,
};