bug fix
This commit is contained in:
parent
5a504dfcb3
commit
07ffeba068
|
@ -59,7 +59,6 @@ public class DmpRDAMapper{
|
|||
if (dmp.getUpdatedAt() == null) throw new MyApplicationException("DMP Modified is missing");
|
||||
if (dmp.getLabel() == null) throw new MyApplicationException("DMP Label is missing");
|
||||
if (dmp.getProperties() == null) throw new MyApplicationException("DMP is missing language and contact properties");
|
||||
if (dmp.getDescriptions() == null || dmp.getDescriptions().isEmpty()) throw new MyApplicationException("DMP has no Datasets");
|
||||
|
||||
List<ReferenceModel> grants = this.getReferenceModelOfTypeCode(dmp, this.rdaFileTransformerServiceProperties.getGrantReferenceCode());
|
||||
List<ReferenceModel> researchers = this.getReferenceModelOfTypeCode(dmp, this.rdaFileTransformerServiceProperties.getResearcherReferenceCode());
|
||||
|
@ -144,7 +143,7 @@ public class DmpRDAMapper{
|
|||
|
||||
Map<String, Object> datasetExtraData = new HashMap<>();
|
||||
datasetExtraData.put("dmp", rda);
|
||||
rda.setDataset(dmp.getDescriptions().stream().map(dataset -> datasetRDAMapper.toRDA(dataset, datasetExtraData)).toList());
|
||||
rda.setDataset(dmp.getDescriptions() == null ? new ArrayList<>() : dmp.getDescriptions().stream().map(dataset -> datasetRDAMapper.toRDA(dataset, datasetExtraData)).toList());
|
||||
return rda;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue