RED-8043 - Save section for manual redactions and unprocessed manual redactions

This commit is contained in:
Andrei Isvoran 2024-01-09 16:02:24 +01:00
parent a299f99575
commit c7c22bfd06
2 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@ public class AddRedactionPersistenceService {
manualRedactionEntry.setPositions(convert(addRedactionRequest.getPositions()));
manualRedactionEntry.setTypeId(addRedactionRequest.getDossierTemplateTypeId());
manualRedactionEntry.setDictionaryEntryType(addRedactionRequest.getDictionaryEntryType());
manualRedactionEntry.setSection(addRedactionRequest.getSection());
return manualRedactionRepository.saveAndFlush(manualRedactionEntry);

View File

@ -54,6 +54,9 @@ public class RedactionAnalysisResponseReceiver {
manualRedactionEntry.setTextBefore(unprocessedManualEntity.getTextBefore());
manualRedactionEntry.setTextAfter(unprocessedManualEntity.getTextAfter());
manualRedactionEntry.setPositions(convertPositions(unprocessedManualEntity.getPositions()));
if (manualRedactionEntry.getSection() == null ||!manualRedactionEntry.getSection().equals(unprocessedManualEntity.getSection())) {
manualRedactionEntry.setSection(unprocessedManualEntity.getSection());
}
addRedactionPersistenceService.update(manualRedactionEntry);
}