RED-7034 - Check for dossierDictionaryOnly flag when add to template dict is requested #48

Merged
corina.olariu.ext1 merged 1 commits from RED-7034_update into master 2023-07-10 12:04:12 +02:00

View File

@ -314,17 +314,13 @@ public class ManualRedactionService {
}
if (!removeRedactionRequest.isRemoveFromDictionary() && AnnotationStatus.APPROVED.equals(removeRedactionRequest.getStatus())) {
Optional<RedactionLogEntry> redactionLogEntryOptional = redactionLog.getRedactionLogEntry()
.stream()
.filter(entry -> entry.getId().equals(removeRedactionRequest.getAnnotationId()))
.findFirst();
RedactionLogEntry redactionLogEntry = null;
boolean requiresAnalysis = false;
try {
redactionLogEntry = getRedactionLogEntry(redactionLog, removeRedactionRequest.getAnnotationId());
requiresAnalysis = redactionLogEntry.isHint();
} catch (NotFoundException e) {
requiresAnalysis = false;
}
actionPerformed = actionPerformed || requiresAnalysis;
if (!requiresAnalysis && idRemoval.isApproved()) {