Fixed issue when upload dmps without set profile
This commit is contained in:
parent
30542b4156
commit
81c3e220e8
|
@ -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())) {
|
||||
|
|
Loading…
Reference in New Issue