diff --git a/src/Model/Publication/Config/PublicationUsageGroup.php b/src/Model/Publication/Config/PublicationUsageGroup.php index 42fe80e8f..b2cac9fdb 100644 --- a/src/Model/Publication/Config/PublicationUsageGroup.php +++ b/src/Model/Publication/Config/PublicationUsageGroup.php @@ -152,6 +152,10 @@ public function delete() $pu->setGroupId(null); $pu->update(); } + foreach (PublicationSubUsage::where(['group_id' => intval($this->getId())])->get() as $psu) { + $psu->setGroupId(null); + $psu->update(); + } parent::delete(); } }