RED-7256 - Overlapping annotation color from imported redaction and resized redaction
- fix the NPE aldo for legalBasis changes
This commit is contained in:
parent
85737653f7
commit
705dd42333
@ -12,7 +12,6 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -211,7 +210,7 @@ public class EntityLogMergeService {
|
||||
.requestedDate(manualResizeRedaction.getRequestDate())
|
||||
.processedDate(null)
|
||||
.userId(manualResizeRedaction.getUser());
|
||||
if (Strings.isNullOrEmpty(manualResizeRedaction.getValue())) {
|
||||
if (!Strings.isNullOrEmpty(manualResizeRedaction.getValue())) {
|
||||
manualChange.propertyChanges(Map.of("value", manualResizeRedaction.getValue()));
|
||||
}
|
||||
entityLogEntry.getManualChanges().add(manualChange.build());
|
||||
@ -228,13 +227,18 @@ public class EntityLogMergeService {
|
||||
entity.get().setSection(manualLegalBasisChange.getSection());
|
||||
entity.get().setValue(manualLegalBasisChange.getValue());
|
||||
addChanges(entity.get().getChanges(), ChangeType.CHANGED, entityLog.getAnalysisNumber());
|
||||
Map<String, String> propertyChanges = Map.of("legalBasis", manualLegalBasisChange.getLegalBasis());
|
||||
if (!Strings.isNullOrEmpty(manualLegalBasisChange.getValue())) {
|
||||
propertyChanges.put("value", manualLegalBasisChange.getValue());
|
||||
}
|
||||
if(!Strings.isNullOrEmpty(manualLegalBasisChange.getSection())) {
|
||||
propertyChanges.put("section", manualLegalBasisChange.getSection());
|
||||
}
|
||||
entity.get().getManualChanges().add(ManualChange.builder()
|
||||
.manualRedactionType(ManualRedactionType.LEGAL_BASIS_CHANGE)
|
||||
.requestedDate(manualLegalBasisChange.getRequestDate())
|
||||
.processedDate(null)
|
||||
.propertyChanges(Map.of("value", manualLegalBasisChange.getValue(),
|
||||
"section", manualLegalBasisChange.getSection(),
|
||||
"legalBasis", manualLegalBasisChange.getLegalBasis()))
|
||||
.propertyChanges(propertyChanges)
|
||||
.userId(manualLegalBasisChange.getUser())
|
||||
.build());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user