Fix critical issue when uploading Dataset Template

This commit is contained in:
George Kalampokis 2022-06-07 10:33:37 +03:00
parent 91566c9710
commit ea8407eece
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ public class Admin extends BaseController {
@RequestMapping(method = RequestMethod.POST, value = {"/upload", "/upload/{id}"})
public ResponseEntity<Object> setDatasetProfileXml(@RequestParam("file") MultipartFile file,
@PathVariable(value = "id") String id,
@PathVariable(value = "id", required = false) String id,
@ClaimedAuthorities(claims = {ADMIN, DATASET_PROFILE_MANAGER}) Principal principal) throws Exception {
eu.eudat.logic.utilities.documents.xml.datasetProfileXml.datasetProfileModel.DatasetProfile datasetProfileModel = this.datasetProfileManager.createDatasetProfileFromXml(file);
eu.eudat.models.data.admin.composite.DatasetProfile datasetProfileEntity = datasetProfileModel.toAdminCompositeModel(file.getOriginalFilename());