When Importing from json use the given name on the DMP

This commit is contained in:
George Kalampokis 2020-03-30 15:36:07 +03:00
parent dca8fa83a0
commit 4b5be15f41
1 changed files with 1 additions and 0 deletions

View File

@ -1336,6 +1336,7 @@ public class DataManagementPlanManager {
List<DMP> result = new ArrayList<>();
for (MultipartFile file: files) {
DMP dmp = rdaManager.convertToEntity(new String(file.getBytes(), "UTF-8"));
dmp.setLabel(file.getOriginalFilename());
UserInfo me = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
dmp.setModified(new Date());
dmp.setCreator(me);