Skip to content

Scheduling infrastructure for absolutely everyone.

fix error when updating event type availability (#9428)

Carina Wollendorfer7a71a5ddd4b3
diff --git a/apps/web/pages/event-types/[type]/index.tsx b/apps/web/pages/event-types/[type]/index.tsx
index 649fa67a813..62725e7a717 100644
--- a/apps/web/pages/event-types/[type]/index.tsx
+++ b/apps/web/pages/event-types/[type]/index.tsx
@@ -372,8 +372,9 @@ const EventTypePage = (props: EventTypeSetupProps) => {
throw new Error(t("seats_and_no_show_fee_error"));
}
+ const { availability, ...rest } = input;
updateMutation.mutate({
- ...input,
+ ...rest,
locations,
recurringEvent,
periodStartDate: periodDates.startDate,
@@ -453,9 +454,9 @@ const EventTypePage = (props: EventTypeSetupProps) => {
}
}
}
-
+ const { availability, ...rest } = input;
updateMutation.mutate({
- ...input,
+ ...rest,
locations,
recurringEvent,
periodStartDate: periodDates.startDate,