CC-3153: When cancelling a show that is currently on-air, the show-instance is not removed.

-fixed
This commit is contained in:
Martin Konecny 2011-12-02 16:22:54 -05:00
parent 82f3a25f69
commit efbaebbbf5
3 changed files with 12 additions and 0 deletions

View file

@ -108,6 +108,10 @@ class Application_Model_Show {
//remove everything about this show.
public function deleteShow()
{
//usually we hide the show-instance, but in this case we are deleting the show template
//so delete all show-instances as well.
CcShowInstancesQuery::create()->filterByDbOriginalShow($this->_showId)->delete();
$show = CcShowQuery::create()->findPK($this->_showId);
$show->delete();
}