RED-10268:

added new filter that also removes soft and hard deleted files on download preperations
This commit is contained in:
yhampe 2024-11-19 11:57:15 +01:00
parent d96e1ce547
commit fce85b7813

View File

@ -161,7 +161,7 @@ public class DownloadController implements DownloadResource {
} // otherwise consider the files from dossier
var validFilesAndNotProcessed = validFiles.stream()
.filter(f -> !(f.getAnalysisVersion() > 0 && f.getNumberOfAnalyses() > 0))
.filter(f -> !(f.getAnalysisVersion() > 0 && f.getNumberOfAnalyses() > 0 && !f.isSoftOrHardDeleted()))
.collect(Collectors.toList());
if (!validFilesAndNotProcessed.isEmpty()) {
throw new BadRequestException("At least a file is in its initial analysis process");