Pull request #184: fixed dictionary add corner case
Merge in RED/redaction-service from redaction-log-backend-preview-remove-code-duplication-from-ui to master * commit 'cc1c3122bb3a4704a8ca1ff858a35f335d7d058b': fixed dictionary add corner case
This commit is contained in:
commit
80c68d6278
@ -640,7 +640,15 @@ public class RedactionLogCreatorService {
|
|||||||
redactionLogEntry.setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
redactionLogEntry.setDictionaryEntry(manualRedaction.isAddToDossierDictionary());
|
||||||
redactionLogEntry.setDossierDictionaryEntry(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