Commit b14bbe89 authored by Matija Obreza's avatar Matija Obreza

FIX AccessionDetails#storage must get the value from AccessionData#stoRage

parent da15c170
......@@ -109,7 +109,7 @@ public class AccessionDetails {
ad.mlsStatus = accession.getMlsStatus();
ad.art15 = accession.getInTrust();
ad.sampStat = accession.getSampleStatus();
ad.storage = MCPDUtil.toIntegers(accession.getStorage());
ad.storage = new ArrayList<Integer>(accession.getStoRage());
ad.taxonomy = Taxonomy.from(accession.getTaxonomy());
ad.acceUrl = accession.getAcceUrl();
......
......@@ -40,6 +40,7 @@ import javax.persistence.Version;
import org.genesys2.server.model.IdUUID;
import org.genesys2.server.model.impl.Country;
import org.genesys2.server.model.impl.FaoInstitute;
import org.genesys2.util.MCPDUtil;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
......@@ -145,6 +146,7 @@ public abstract class AccessionData implements IdUUID, Serializable {
this.origin = null;
this.instituteCode = getInstitute().getCode();
this.storage=MCPDUtil.toMcpdArray(getStoRage());
}
public FaoInstitute getInstitute() {
......
......@@ -462,8 +462,8 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
for (AccessionData a : accessionRepository.findAll(accessionIds)) {
AllStuff all = map.get(a.getAccessionId().getId());
all.accession = a;
// Can use a#getStorage() instead
// a.getStoRage().size();
// Don't use a#getStorage()
a.getStoRage().size();
all.names = new ArrayList<AccessionAlias>();
all.remarks = new ArrayList<AccessionRemark>();
}
......
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