Removed bug in club model that avoids deletion of all offers

This commit is contained in:
Christian Wolf 2019-06-17 13:57:01 +02:00
parent 5179ea9de5
commit 1d1bde1a8d

View File

@ -102,6 +102,9 @@ class CommonClubsModelClub extends AbstractCommonClubsModel
*/ */
public function setOfferIds($ids) public function setOfferIds($ids)
{ {
if(empty($ids))
$ids = array();
$dbo = $this->getFactory()->loadById($this->getId()); $dbo = $this->getFactory()->loadById($this->getId());
$currentOffersAssocs = $dbo->getOfferAssocs(); $currentOffersAssocs = $dbo->getOfferAssocs();
$currentIds = array_map(function($obj){ $currentIds = array_map(function($obj){