Skip to content

Commit

Permalink
Fixed auto-removing parent structure on successNoFile form
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaplet committed Jun 25, 2019
1 parent b140f36 commit 6ec8d19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Component/Frontend/StructureModal/StructureModal.php
Expand Up @@ -357,6 +357,7 @@ public function successNoFile(Form $form) : void
{
$recipeSlug = $this->getRecipeSlug();
$structure = $this->getStructure();
$parentStructure = $structure ? $structure->getParent() : NULL;
$noFileVariables = $this->getNoFileVariables();

$this->structureManager->getConnection()->beginTransaction();
Expand All @@ -366,7 +367,8 @@ public function successNoFile(Form $form) : void
$structure = $this->structureManager->save(
$structure,
$recipeSlug,
$this->user
$this->user,
$parentStructure
);

$this->structureValueManager->saveNoFileFields(
Expand Down

0 comments on commit 6ec8d19

Please sign in to comment.