mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-16 22:43:12 +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 {
|
SubmissionStepConfig config) throws DCInputsReaderException, SQLException {
|
||||||
//TODO MANAGE METADATA
|
//TODO MANAGE METADATA
|
||||||
|
|
||||||
for (String key : uploadConfigurationService.getMap().keySet()) {
|
UploadConfiguration uploadConfig = uploadConfigurationService.getMap().get(config.getId());
|
||||||
if (getName().equals(key)) {
|
if (uploadConfig.isRequired() && !itemService.hasUploadedFiles(obj.getItem())) {
|
||||||
UploadConfiguration uploadConfig = uploadConfigurationService.getMap().get(config.getId());
|
addError(ERROR_VALIDATION_FILEREQUIRED,
|
||||||
if (uploadConfig.isRequired() && !itemService.hasUploadedFiles(obj.getItem())) {
|
"/" + WorkspaceItemRestRepository.OPERATION_PATH_SECTIONS + "/"
|
||||||
addError(ERROR_VALIDATION_FILEREQUIRED,
|
+ config.getId());
|
||||||
"/" + WorkspaceItemRestRepository.OPERATION_PATH_SECTIONS + "/"
|
|
||||||
+ config.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return getErrors();
|
return getErrors();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user