From eb38503d6eeab8cc073e2e86f5375caac16f8487 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 13 Feb 2013 11:51:25 -0500 Subject: [PATCH] CC-4946: Now Playing -> Apache error when empty show starts -we were trying to update the is_scheduled flag on a non-schedule item --- .../public/js/airtime/showbuilder/builder.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index d40f4f349..9bbc4db92 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -86,13 +86,15 @@ var AIRTIME = (function(AIRTIME){ // once a track plays out we need to check if we can update // the is_scheduled flag in cc_files - $.post(baseUrl+"schedule/update-future-is-scheduled", - {"format": "json", "schedId": schedId}, function(data) { - if (data.redrawLibTable !== undefined && data.redrawLibTable) { - $("#library_content").find("#library_display").dataTable().fnStandingRedraw(); - } - }); - oSchedTable.fnDraw(); + if (schedId > 0) { + $.post(baseUrl+"schedule/update-future-is-scheduled", + {"format": "json", "schedId": schedId}, function(data) { + if (data.redrawLibTable !== undefined && data.redrawLibTable) { + $("#library_content").find("#library_display").dataTable().fnStandingRedraw(); + } + }); + oSchedTable.fnDraw(); + } }; mod.checkSelectButton = function() {