fix creation of new household during move

This commit is contained in:
2021-06-10 11:48:06 +02:00
parent 057bdf6a6a
commit 6fed008ff2
3 changed files with 7 additions and 2 deletions

View File

@@ -54,6 +54,11 @@ class HouseholdMemberController extends ApiController
//
$em = $this->getDoctrine()->getManager();
// if new household, persist it
if (FALSE === $em->contains($editor->getHousehold())) {
$em->persist($editor->getHousehold());
}
foreach ($editor->getPersistable() as $el) {
$em->persist($el);
}