Skip to content
Snippets Groups Projects

Try To address the #3 suggestion and convert the patch to mr for better review.

Open Prem Suthar requested to merge issue/salesforce-3502753:3502753-call-to-undefined into 5.1.x
1 file
+ 7
3
Compare changes
  • Side-by-side
  • Inline
@@ -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,12 @@ 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->isSyncing()) {
return;
}
Loading