Mercurial > hg > isophonics-drupal-site
diff core/modules/migrate/src/MigrateExecutable.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children | af1871eacc83 |
line wrap: on
line diff
--- a/core/modules/migrate/src/MigrateExecutable.php Tue Jul 10 15:07:59 2018 +0100 +++ b/core/modules/migrate/src/MigrateExecutable.php Thu Feb 28 13:21:36 2019 +0000 @@ -221,7 +221,9 @@ if ($save) { try { $this->getEventDispatcher()->dispatch(MigrateEvents::PRE_ROW_SAVE, new MigratePreRowSaveEvent($this->migration, $this->message, $row)); - $destination_id_values = $destination->import($row, $id_map->lookupDestinationId($this->sourceIdValues)); + $destination_ids = $id_map->lookupDestinationIds($this->sourceIdValues); + $destination_id_values = $destination_ids ? reset($destination_ids) : []; + $destination_id_values = $destination->import($row, $destination_id_values); $this->getEventDispatcher()->dispatch(MigrateEvents::POST_ROW_SAVE, new MigratePostRowSaveEvent($this->migration, $this->message, $row, $destination_id_values)); if ($destination_id_values) { // We do not save an idMap entry for config.