Fixed issue when upload dmps without set profile

This commit is contained in:
George Kalampokis 2020-06-03 12:43:31 +03:00
parent 30542b4156
commit 81c3e220e8
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ public class DMPs extends BaseController {
}
@RequestMapping(method = RequestMethod.POST, value = {"/upload"})
public ResponseEntity<ResponseItem> dmpUpload(@RequestParam("file") MultipartFile[] files, @RequestParam("profiles")String[] profiles, Principal principal) throws Exception {
public ResponseEntity<ResponseItem> dmpUpload(@RequestParam("file") MultipartFile[] files, @RequestParam(name = "profiles", required = false)String[] profiles, Principal principal) throws Exception {
if (files[0].getContentType().equals(APPLICATION_JSON.toString())) {
this.dataManagementPlanManager.createFromRDA(files, principal, profiles);
} else if (files[0].getContentType().equals(APPLICATION_ATOM_XML.toString())) {