Fix bug in initial scheduling of events

Resolves inability to schedule a nonscheduled event:

    ActionController::RoutingError: No route matches [PUT] "/admin/conferences/…/event_schedules"

`event_schedule_id` represents the absence of a schedule as either an
empty string or undefined, not as null.
This commit is contained in:
Andrew Kvalheim
2023-05-31 14:51:47 -07:00
committed by Henne Vogelsang
parent f29409945b
commit 514ea1efbd

View File

@@ -46,7 +46,7 @@ var Schedule = {
room_id: new_parent.attr("room_id"),
start_time: (new_parent.attr("date") + ' ' + new_parent.attr("hour"))
}};
if(event_schedule_id != null){
if(event_schedule_id){
type = 'PUT';
my_url += ('/' + event_schedule_id);
}