diff --git a/airtime_mvc/application/models/Schedule.php b/airtime_mvc/application/models/Schedule.php index 231733828..3d82756ba 100644 --- a/airtime_mvc/application/models/Schedule.php +++ b/airtime_mvc/application/models/Schedule.php @@ -1281,6 +1281,15 @@ SQL; public static function checkOverlappingShows($show_start, $show_end, $update=false, $instanceId=null, $showId=null) { + //if the show instance does not exist or was deleted, return false + $ccShowInstance = CcShowInstancesQuery::create() + ->filterByDbShowId($showId) + ->filterByDbStarts($show_start->format("Y-m-d H:i:s")) + ->findOne(); + if (!$ccShowInstance || $ccShowInstance->getDbModifiedInstance() == true) { + return false; + } + $overlapping = false; $params = array(