Skip to content

Commit

Permalink
Fix saving new problems with statements
Browse files Browse the repository at this point in the history
Fixes #2646.

We used to persist the entity both before and after calling the lifecycle callbacks ourselves, which would introduce weird behavior where Doctrine wanted to insert some rows twice.
By not persisting before calling the callbacks ourselves, this issue goes away.
  • Loading branch information
Nicky Gerritsen committed Aug 16, 2024
1 parent 3e25ec9 commit 9f12b77
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion webapp/src/Controller/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,6 @@ protected function processAddFormForExternalIdEntity(
return $response;
}
} else {
$this->em->persist($entity);
$this->saveEntity($entity, null, true);
}
return $this->redirect($urlGenerator());
Expand Down

0 comments on commit 9f12b77

Please sign in to comment.