Commit 1d5c1349 authored by Matija Obreza's avatar Matija Obreza

Taxonomy: Also update references to current accepted names

parent 978e0f56
......@@ -152,7 +152,15 @@ public class Taxonomy2GRINMatcher {
/*@formatter:on*/
{
if (taxonomy.getOverrideTaxonomySpecies() != null) {
TaxonomySpecies overrideSpecies = taxonomy.getOverrideTaxonomySpecies();
// Update current name
taxonomy.setGrinTaxonomySpecies(overrideSpecies);
taxonomy.setCurrentTaxonomySpecies(overrideSpecies.getCurrentTaxonomySpecies());
}
final List<IGrinSpecies> speciesRows = taxonomyDatabase.findSpeciesRow(genus, species, StringUtils.defaultIfBlank(subtaxa, null));
if (speciesRows.size() == 1) {
final IGrinSpecies speciesRow = speciesRows.get(0);
if (taxonomy.getOverrideTaxonomySpecies() == null || speciesRow.getSpeciesId().equals(taxonomy.getOverrideTaxonomySpecies().getId())) {
......@@ -162,6 +170,7 @@ public class Taxonomy2GRINMatcher {
} else {
// Don't touch!
}
} else {
LOG.debug("Multiple speciesRows match genus={} species={} subtaxa={}", genus, species, subtaxa);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment