handling add to dict requests

This commit is contained in:
Timo 2021-07-13 11:35:18 +03:00
parent 279fdc6985
commit af46bdca90

View File

@ -635,13 +635,14 @@ public class RedactionLogCreatorService {
for (var manualRedaction : manualRedactions.getEntriesToAdd()) { for (var manualRedaction : manualRedactions.getEntriesToAdd()) {
if (manualRedaction.getProcessedDate() == null) {
if (manualRedaction.isAddToDictionary() || manualRedaction.isAddToDossierDictionary()) { if (manualRedaction.isAddToDictionary() || manualRedaction.isAddToDossierDictionary()) {
var redactionLogEntry = createRedactionLogEntry(manualRedaction, manualRedaction.getId(), dossierTemplateId); var redactionLogEntry = createRedactionLogEntry(manualRedaction, manualRedaction.getId(), dossierTemplateId);
redactionLogEntry.setDictionaryEntry(manualRedaction.isAddToDossierDictionary()); redactionLogEntry.setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
redactionLogEntry.setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary()); redactionLogEntry.setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary());
redactionLogEntry.setPositions(manualRedaction.getPositions()); redactionLogEntry.setPositions(manualRedaction.getPositions());
manualRedaction.
var found = redactionLog.getRedactionLogEntry().stream().filter(r -> r.getId().equalsIgnoreCase(redactionLogEntry.getId())).findAny(); var found = redactionLog.getRedactionLogEntry().stream().filter(r -> r.getId().equalsIgnoreCase(redactionLogEntry.getId())).findAny();
if (found.isPresent()) { if (found.isPresent()) {
@ -656,6 +657,7 @@ public class RedactionLogCreatorService {
} }
} }
} }
}
public static class PreviewReasonHolder implements ReasonHolder { public static class PreviewReasonHolder implements ReasonHolder {