Merge branch 'RED-8043-broken-section' into 'master'
RED-8043 - Fix section Closes RED-8043 See merge request redactmanager/persistence-service!303
This commit is contained in:
commit
5a95dfbc1c
@ -66,7 +66,7 @@ public class EntityLogMergeService {
|
||||
@Observed(name = "EntityLogMergeService", contextualName = "merge-entity-log")
|
||||
public EntityLog mergeEntityLog(ManualRedactions manualRedactions, EntityLog entityLog, DossierEntity dossier) {
|
||||
|
||||
log.info("Merging EntityLog");
|
||||
log.debug("Merging EntityLog");
|
||||
List<BaseAnnotation> allManualChanges = allManualChanges(manualRedactions);
|
||||
List<String> manualChangesIds = allManualChanges.stream().map(BaseAnnotation::getAnnotationId).toList();
|
||||
List<EntityLogEntry> matchingEntities = entityLog.getEntityLogEntry().stream().filter(entityLogEntry -> manualChangesIds.contains(entityLogEntry.getId())).collect(Collectors.toList());
|
||||
@ -92,7 +92,7 @@ public class EntityLogMergeService {
|
||||
}
|
||||
});
|
||||
|
||||
log.info("EntityLog merged successfully.");
|
||||
log.debug("EntityLog merged successfully.");
|
||||
return entityLog;
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ public class RedactionAnalysisResponseReceiver {
|
||||
manualRedactionEntry.setTextBefore(unprocessedManualEntity.getTextBefore());
|
||||
manualRedactionEntry.setTextAfter(unprocessedManualEntity.getTextAfter());
|
||||
manualRedactionEntry.setPositions(convertPositions(unprocessedManualEntity.getPositions()));
|
||||
if (StringUtils.isNullOrEmpty(manualRedactionEntry.getSection()) && StringUtils.isNullOrEmpty(unprocessedManualEntity.getSection()) && !manualRedactionEntry.getSection().equals(unprocessedManualEntity.getSection())) {
|
||||
if (StringUtils.isNullOrEmpty(manualRedactionEntry.getSection()) || (!StringUtils.isNullOrEmpty(unprocessedManualEntity.getSection()) && !manualRedactionEntry.getSection().equals(unprocessedManualEntity.getSection()))) {
|
||||
manualRedactionEntry.setSection(unprocessedManualEntity.getSection());
|
||||
}
|
||||
addRedactionPersistenceService.update(manualRedactionEntry);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user