Skip to content

Commit

Permalink
Go ahead and hard-delete any unpublished drafts
Browse files Browse the repository at this point in the history
They were never really part of the content in the first place
  • Loading branch information
brandonkelly committed Feb 6, 2024
1 parent c486a6f commit 6f0f493
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/elements/NestedElementManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,8 @@ private function deleteOtherNestedElements(ElementInterface $owner, array $excep

foreach ($elements as $element) {
if ($element->getPrimaryOwnerId() === $owner->id) {
$elementsService->deleteElement($element);
$hardDelete = $element->getIsUnpublishedDraft();
$elementsService->deleteElement($element, $hardDelete);
} else {
// Just delete the ownership relation
$deleteOwnership[] = $element->id;
Expand Down

0 comments on commit 6f0f493

Please sign in to comment.