Skip to content

Commit

Permalink
Fix Exception on config import
Browse files Browse the repository at this point in the history
  • Loading branch information
DiDebru committed Apr 24, 2019
1 parent 92cc901 commit e3bff7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Entity/OgMembershipType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e3bff7a

Please sign in to comment.