Merge branch 'RED-7034_update' into 'master'

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

Closes RED-7034

See merge request redactmanager/persistence-service!48
This commit is contained in:
Corina Olariu 2023-07-10 12:04:12 +02:00
commit c3782323eb

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()) {