When Importing from json use the given name on the DMP
This commit is contained in:
parent
dca8fa83a0
commit
4b5be15f41
|
@ -1336,6 +1336,7 @@ public class DataManagementPlanManager {
|
||||||
List<DMP> result = new ArrayList<>();
|
List<DMP> result = new ArrayList<>();
|
||||||
for (MultipartFile file: files) {
|
for (MultipartFile file: files) {
|
||||||
DMP dmp = rdaManager.convertToEntity(new String(file.getBytes(), "UTF-8"));
|
DMP dmp = rdaManager.convertToEntity(new String(file.getBytes(), "UTF-8"));
|
||||||
|
dmp.setLabel(file.getOriginalFilename());
|
||||||
UserInfo me = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
|
UserInfo me = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
|
||||||
dmp.setModified(new Date());
|
dmp.setModified(new Date());
|
||||||
dmp.setCreator(me);
|
dmp.setCreator(me);
|
||||||
|
|
Loading…
Reference in New Issue