SAAS-1121: New link show instances don't get created sometimes if there is no show content
Fixed by checking if the linked show is empty before trying to copy its tracks into new show instances
This commit is contained in:
parent
ee70a0dbea
commit
7f64edafff
|
@ -234,8 +234,9 @@ class Application_Service_SchedulerService
|
|||
//with content from $linkedShowSchedule.
|
||||
try {
|
||||
$con->beginTransaction();
|
||||
foreach ($instanceIdsToFill as $id)
|
||||
{
|
||||
|
||||
if (!empty($linkedShowSchedule)) {
|
||||
foreach ($instanceIdsToFill as $id) {
|
||||
//Start by clearing the show instance that needs to be filling. This ensure
|
||||
//we're not going to get in trouble in case there's an programming error somewhere else.
|
||||
self::clearShowInstanceContents($id);
|
||||
|
@ -291,6 +292,7 @@ class Application_Service_SchedulerService
|
|||
$instance = CcShowInstancesQuery::create()->findPk($id);
|
||||
$instance->updateScheduleStatus($con);
|
||||
} //foreach linked instance
|
||||
}
|
||||
|
||||
//update time_filled and last_scheduled in cc_show_instances
|
||||
$now = gmdate(DEFAULT_TIMESTAMP_FORMAT);
|
||||
|
|
Loading…
Reference in New Issue