Skip to content

Commit

Permalink
Skip alert type postsave during config sync
Browse files Browse the repository at this point in the history
Fix #251

During config sync operations, if creating a new alert banner type the
visibility field will try to be created, even though that is
part of config.

This checks if the isSyncing flag is set and skips over the
postSave actions as we assume they are part of the config
being imported.
  • Loading branch information
andybroomfield committed May 18, 2023
1 parent 3b7d818 commit 1d47058
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Entity/AlertBannerEntityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AlertBannerEntityType extends ConfigEntityBundleBase implements AlertBanne
public function postSave(EntityStorageInterface $storage, $update = TRUE) {

// Add fields and workflow when creating a new alert banner type.
if (!$update) {
if (!$update && !$this->isSyncing) {

$bundle = $this->id();
$config_directory = new FileStorage(__DIR__ . '/../../config/install');
Expand Down

0 comments on commit 1d47058

Please sign in to comment.