Pull request #374: RED-3616: Fixed removing not redaction images that intersects imported redactions

Merge in RED/redaction-service from RED-3616-11 to master

* commit 'fbd9bc71a80ba7788992c6213fd88ce649e127e2':
  RED-3616: Fixed removing not redaction images that intersects imported redactions
This commit is contained in:
Dominique Eiflaender 2022-04-12 11:18:53 +02:00
commit d4b0de9184

View File

@ -69,7 +69,7 @@ public class RedactionLogMergeService {
redactionLog.getRedactionLogEntry().removeIf(entry -> {
if(entry.getImportedRedactionIntersections() != null) {
entry.getImportedRedactionIntersections().removeAll(skippedImportedRedactions);
if (!entry.getImportedRedactionIntersections().isEmpty() && (!entry.isImage() || entry.isImage() && !entry.isRedacted())) {
if (!entry.getImportedRedactionIntersections().isEmpty() && (!entry.isImage() || entry.isImage() && !(entry.getType().equals("image") || entry.getType().equals("ocr")))) {
return true;
}
}