Commit f3e65d7c authored by Matija Obreza's avatar Matija Obreza Committed by Maxym Borodenko
Browse files

Fix: Taxonomy2 must trim whitespace

parent 0f9573b1
......@@ -239,21 +239,16 @@ public class Taxonomy2 extends GlobalVersionedAuditedModel {
* @return
*/
public Taxonomy2 sanitize() {
if (species == null) {
species = "sp.";
}
if ("sp".equalsIgnoreCase(species)) {
genus = StringUtils.trimToEmpty(genus);
species = StringUtils.trimToEmpty(species);
spAuthor = StringUtils.trimToEmpty(spAuthor);
subtaxa = StringUtils.trimToEmpty(subtaxa);
subtAuthor = StringUtils.trimToEmpty(subtAuthor);
if (StringUtils.isBlank(species) || "sp".equalsIgnoreCase(species)) {
species = "sp.";
}
if (spAuthor == null) {
spAuthor = "";
}
if (subtaxa == null) {
subtaxa = "";
}
if (subtAuthor == null) {
subtAuthor = "";
}
return this;
}
......
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