Skip to content

Commit

Permalink
https://github.com/gbif/pipelines/issues/257#issuecomment-779347876
Browse files Browse the repository at this point in the history
Using the nubKey to get the IUCN Red List category, the accepted name is not being used toa void misleading results after mixing multiple checklists
  • Loading branch information
fmendezh committed Feb 15, 2021
1 parent e8ae095 commit 13f5d94
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,7 @@ public void start() {
* Gets the first non-null value between the accepted usage and the usage of a NameUsageMatch.
*/
private Integer getAcceptedUsageOrUsage(NameUsageMatch nameUsageMatch) {
if (Objects.nonNull(nameUsageMatch.getAcceptedUsage())) {
return nameUsageMatch.getAcceptedUsage().getKey();
} else if (Objects.nonNull(nameUsageMatch.getUsage())) {
return nameUsageMatch.getUsage().getKey();
}
return null;
return Objects.nonNull(nameUsageMatch.getUsage())? nameUsageMatch.getUsage().getKey(): null;
}

/**
Expand Down

0 comments on commit 13f5d94

Please sign in to comment.