Skip to content

Commit

Permalink
Merge pull request #3487 from doenietzomoeilijk/master
Browse files Browse the repository at this point in the history
 Explicitly remove a removed Relation from the newRelations collection.
  • Loading branch information
bobdenotter authored Oct 9, 2023
2 parents 9a6f36a + 3a5b658 commit 1d5ef63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Controller/Backend/ContentEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,11 @@ static function (Relation $relation) use ($content) {
) {
$currentRelation->getFromContent()->removeRelationsFromThisContent($currentRelation);
}
$currentRelations = $currentRelations->filter(
static function (Relation $r) use ($currentRelation) {
return $r !== $currentRelation;
}
);
$this->em->remove($currentRelation);
}

Expand Down

0 comments on commit 1d5ef63

Please sign in to comment.