diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index 824d18e..422c13f 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -350,7 +350,7 @@ public function save(EntityInterface $entity) { // If the entity is new but a config file for it already exists, prevent // it to be overwritten. - if ($entity->isNew() && !$config->isNew()) { + if ($entity->isNew() && !$is_new) { throw new EntityStorageException(String::format('@type entity with ID @id already exists.', array('@type' => $this->entityType, '@id' => $id))); }