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() {