Skip to content
Snippets Groups Projects
Commit bd5f92d1 authored by Aaron Bauman's avatar Aaron Bauman
Browse files

Issue #3502753 by balazswmann: Call to undefined method ::isSyncing() during...

Issue #3502753 by balazswmann: Call to undefined method ::isSyncing() during push on certain entities
parent 3d8ba3ff
No related branches found
No related tags found
No related merge requests found
Pipeline #451392 canceled
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment