Commit c2561041 authored by jcorvi's avatar jcorvi
Browse files

Merge branch 'develop' into 'master'

solver error during validation

See merge request !24
parents 00b368b2 a3721a60
Pipeline #28006 passed with stage
in 6 seconds
......@@ -184,13 +184,17 @@ public class FileServiceImp implements FileService {
errors.add("The following document is incomplete : " + string + ", please review that both files : "+ string +"_annotations.json and " + string + "_documents.json where included.");
}
errors.addAll(validateDocumentsInDatabase(Arrays.asList(files)));
if(!allow_duplicates) {
//solo se esta validando los _documents.json habria que tambien tener en cuenta los annotations.
errors.addAll(validateDocumentsNamesInDatabase(Arrays.asList(files)));
if(errors.size()==0) {
errors.addAll(validateDocumentsInDatabase(Arrays.asList(files)));
if(!allow_duplicates) {
//solo se esta validando los _documents.json habria que tambien tener en cuenta los annotations.
errors.addAll(validateDocumentsNamesInDatabase(Arrays.asList(files)));
}
}
return errors;
}
......@@ -212,8 +216,7 @@ public class FileServiceImp implements FileService {
errors.add("The document " + name + " has a documentId ("+doc.getLong("id")+") that was already processed and is present in the database. A document with the same documentId cannot be processed again.");
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
errors.add("The document file " + multipartFile + " is not a valid json files for the PretoxTM system.");
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment