diff --git a/modules/salesforce_push/salesforce_push.module b/modules/salesforce_push/salesforce_push.module index 251abdf6397f1d26a87a40fded88482019c37f3b..a9f8d791c932755d2d5a1bdfe7e757f1f900316e 100644 --- a/modules/salesforce_push/salesforce_push.module +++ b/modules/salesforce_push/salesforce_push.module @@ -6,6 +6,7 @@ */ use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\SynchronizableInterface; use Drupal\salesforce\Event\SalesforceErrorEvent; use Drupal\salesforce\Event\SalesforceEvents; use Drupal\salesforce_mapping\Entity\MappedObject; @@ -47,9 +48,11 @@ function salesforce_push_entity_delete(EntityInterface $entity) { */ function salesforce_push_entity_crud(EntityInterface $entity, $op) { // Don't allow mapped objects or mappings to be pushed! - if ($entity->isSyncing() - || $entity instanceof MappedObjectInterface - || $entity instanceof SalesforceMappingInterface) { + if ($entity instanceof MappedObjectInterface || $entity instanceof SalesforceMappingInterface) { + return; + } + // Do not push entities which are synchronizing currently. + if ($entity instanceof SynchronizableInterface && $entity->isSyncing()) { return; }