summaryrefslogtreecommitdiffstats
path: root/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/migrate/src/Plugin/migrate/destination/Entity.php')
-rw-r--r--core/modules/migrate/src/Plugin/migrate/destination/Entity.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
index abf2dc9..1b2c2e7 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
@@ -124,7 +124,8 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
protected function getEntity(Row $row, array $old_destination_id_values) {
$entity_id = reset($old_destination_id_values) ?: $this->getEntityId($row);
if (!empty($entity_id) && ($entity = $this->storage->load($entity_id))) {
- $this->updateEntity($entity, $row);
+ // Allow updateEntity() to change the entity.
+ $entity = $this->updateEntity($entity, $row) ?: $entity;
}
else {
// Attempt to ensure we always have a bundle.