Commit a52d0824 authored by Matija Obreza's avatar Matija Obreza
Browse files

PDCI calculation for CROPNAME and ORIGCTY fixed

parent 595f0159
...@@ -14,13 +14,15 @@ public class Country { ...@@ -14,13 +14,15 @@ public class Country {
private String name; private String name;
public static Country from(org.genesys2.server.model.impl.Country country) { public static Country from(org.genesys2.server.model.impl.Country country) {
Country c = new Country();
if (country != null) { if (country != null) {
Country c = new Country();
c.iso3 = country.getCode3(); c.iso3 = country.getCode3();
c.iso2 = country.getCode2(); c.iso2 = country.getCode2();
c.name = country.getName(); c.name = country.getName();
return c;
} else {
return null;
} }
return c;
} }
public String getIso3() { public String getIso3() {
......
...@@ -103,7 +103,7 @@ public class PDCICalculator implements InitializingBean { ...@@ -103,7 +103,7 @@ public class PDCICalculator implements InitializingBean {
taxonomic(pdci, accessionDetails.getTaxonomy()); taxonomic(pdci, accessionDetails.getTaxonomy());
if (accessionDetails.getCrops() != null && accessionDetails.getCrops().size() > 0) { if (StringUtils.isNotBlank(accessionDetails.getCropName())) {
pdci.setCropName(45); pdci.setCropName(45);
} }
......
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