From c662768470f40fdd5ec47af9aeb1c26c3827e551 Mon Sep 17 00:00:00 2001 From: Insasse Date: Tue, 12 Feb 2019 09:07:52 +0100 Subject: [PATCH] Fix Exception on config import --- src/Entity/OgMembershipType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Entity/OgMembershipType.php b/src/Entity/OgMembershipType.php index d20101c58..295c80f2f 100644 --- a/src/Entity/OgMembershipType.php +++ b/src/Entity/OgMembershipType.php @@ -94,7 +94,7 @@ public function save() { * {@inheritdoc} */ public function delete() { - if ($this->id() === OgMembershipInterface::TYPE_DEFAULT) { + if ($this->id() === OgMembershipInterface::TYPE_DEFAULT && !\Drupal::isConfigSyncing()) { throw new \Exception("The default OG membership type cannot be deleted."); } parent::delete();