Browse Source

made title more reliable when migrating objects from old herbarium site with drush

master
ppound 6 years ago
parent
commit
c9ea475206
  1. 2
      islandora_herbarium_object.module

2
islandora_herbarium_object.module

@ -69,7 +69,7 @@ function islandora_herbarium_object_entity_presave(EntityInterface $entity) {
\Drupal::messenger()->addError(t('There was an error retrieving Taxon data. %msg.',
['%msg' => $e->getMessage()]));
}
$title = $taxon->getValue('canonicalName') . ' - ' . $geo->getValue('name');
$title = $entity->get('field_dwc_scientificname')->value . ' - ' . $geo->getValue('name');
if ($title != ' - ') {
$entity->setTitle($title);
}

Loading…
Cancel
Save