mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
for loop is not applicable
This commit is contained in:
@@ -41,15 +41,11 @@ public class UploadValidation extends AbstractValidation {
|
||||
SubmissionStepConfig config) throws DCInputsReaderException, SQLException {
|
||||
//TODO MANAGE METADATA
|
||||
|
||||
for (String key : uploadConfigurationService.getMap().keySet()) {
|
||||
if (getName().equals(key)) {
|
||||
UploadConfiguration uploadConfig = uploadConfigurationService.getMap().get(config.getId());
|
||||
if (uploadConfig.isRequired() && !itemService.hasUploadedFiles(obj.getItem())) {
|
||||
addError(ERROR_VALIDATION_FILEREQUIRED,
|
||||
"/" + WorkspaceItemRestRepository.OPERATION_PATH_SECTIONS + "/"
|
||||
+ config.getId());
|
||||
}
|
||||
}
|
||||
UploadConfiguration uploadConfig = uploadConfigurationService.getMap().get(config.getId());
|
||||
if (uploadConfig.isRequired() && !itemService.hasUploadedFiles(obj.getItem())) {
|
||||
addError(ERROR_VALIDATION_FILEREQUIRED,
|
||||
"/" + WorkspaceItemRestRepository.OPERATION_PATH_SECTIONS + "/"
|
||||
+ config.getId());
|
||||
}
|
||||
return getErrors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user