RED-1728: Do not show isHint flag if only false_positive entries are included in redactionlog

This commit is contained in:
Dominique Eifländer 2021-07-01 09:16:32 +02:00
parent 4c2eda02cc
commit 24ed2498ea

View File

@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
public class AnalyzeResponseService {
public AnalyzeResult createAnalyzeResponse(String dossierId, String fileId, long duration, int pageCount, RedactionLog redactionLog, RedactionChangeLog redactionChangeLog) {
boolean hasHints = redactionLog.getRedactionLogEntry().stream().anyMatch(RedactionLogEntry::isHint);
boolean hasHints = redactionLog.getRedactionLogEntry().stream().anyMatch(entry -> entry.isHint() && !entry.getType().equals("false_positive"));
boolean hasRequests = redactionLog.getRedactionLogEntry()
.stream()