Fixes bug on DMP editor model initializing Funder with null values.

This commit is contained in:
gkolokythas 2019-08-28 11:51:02 +03:00
parent d5970126d2
commit 3d3963f5c1
1 changed files with 6 additions and 4 deletions

View File

@ -252,13 +252,15 @@ public class DataManagementPlan implements DataModel<DMP, DataManagementPlan> {
this.users = entity.getUsers().stream().map(item -> new UserInfoListingModel().fromDataModel(item)).collect(Collectors.toList());
this.doi = entity.getDoi();
this.project = new Project();
if (entity.getProject() != null)
if (entity.getProject() != null) {
this.project = new Project();
this.project = new Project().fromDataModel(entity.getProject());
}
this.funder = new Funder();
if (entity.getGrant().getFunder() != null)
if (entity.getGrant().getFunder() != null) {
this.funder = new Funder();
this.funder.fromDataModel(entity.getGrant().getFunder());
}
return this;
}