fixed dictionary add corner case
This commit is contained in:
parent
6741b8a596
commit
cc1c3122bb
@ -640,7 +640,15 @@ public class RedactionLogCreatorService {
|
||||
redactionLogEntry.setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||
redactionLogEntry.setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||
|
||||
redactionLog.getRedactionLogEntry().add(redactionLogEntry);
|
||||
var found = redactionLog.getRedactionLogEntry().stream().filter(r -> r.getId().equalsIgnoreCase(redactionLogEntry.getId())).findAny();
|
||||
if (found.isPresent()) {
|
||||
found.get().setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||
found.get().setDossierDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||
} else {
|
||||
redactionLog.getRedactionLogEntry().add(redactionLogEntry);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user