redaction-log preview generation and removal of manual redactions from redaction-log

This commit is contained in:
Timo 2021-07-21 16:01:16 +03:00
parent 1ac294fc01
commit d2ffb09987

View File

@ -164,7 +164,13 @@ public class RedactionController implements RedactionResource {
dictionaryService.updateDictionary(redactionRequest.getDossierTemplateId(), redactionRequest.getDossierId());
var redactionLog = redactionStorageService.getRedactionLog(redactionRequest.getDossierId(), redactionRequest.getFileId());
return redactionLogMergeService.mergeRedactionLogData(redactionLog, redactionRequest.getDossierTemplateId(), redactionRequest.getManualRedactions());
if (redactionLog.getComputationalVersion() == 0) {
// old redaction logs are returned directly
return redactionLog;
} else {
return redactionLogMergeService.mergeRedactionLogData(redactionLog, redactionRequest.getDossierTemplateId(), redactionRequest.getManualRedactions());
}
}