From 65e69c4b7ebc867b354e71ec4a770de581210738 Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Wed, 31 May 2023 14:51:47 -0700 Subject: [PATCH] Fix bug in initial scheduling of events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- app/assets/javascripts/osem-schedule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/osem-schedule.js b/app/assets/javascripts/osem-schedule.js index aeb76ae374..5f1e772891 100644 --- a/app/assets/javascripts/osem-schedule.js +++ b/app/assets/javascripts/osem-schedule.js @@ -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); }