Skip to content

Commit

Permalink
FIX Do not write during an elemental owners getCMSFields operation
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Oct 12, 2018
1 parent bc6fa0f commit 8d4937d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Extensions/ElementalAreasExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ public function updateCMSFields(FieldList $fields)

$area = $this->owner->$eaRelationship();

// if area isn't in the database then force a write so the blocks have a parent ID.
if (!$area->isInDb()) {
$area->write();

$this->owner->{$key} = $area->ID;
$this->owner->write();
}

$editor = ElementalEditor::create($eaRelationship, $area);
$editor->setTypes($this->getElementalTypes());

Expand Down

0 comments on commit 8d4937d

Please # to comment.