Skip to content

Commit

Permalink
delete groups missign sub unlinking
Browse files Browse the repository at this point in the history
  • Loading branch information
ferishili committed Oct 11, 2023
1 parent f00b724 commit 3212483
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Model/Publication/Config/PublicationUsageGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit 3212483

Please sign in to comment.