Pull request #390: RED-4075: Add legalBasis if Rule Entity overrides Ai Recommendation
Merge in RED/redaction-service from RED-4075 to master * commit 'c669f9a09a3e5e254d41715f65fef3b158873338': RED-4075: Add legalBasis if Rule Entity overrides Ai Recommendation
This commit is contained in:
commit
4aaef260d7
@ -166,6 +166,9 @@ public class EntitySearchUtils {
|
|||||||
|
|
||||||
if (existing.getType().equals(found.getType())) {
|
if (existing.getType().equals(found.getType())) {
|
||||||
existing.getEngines().addAll(found.getEngines());
|
existing.getEngines().addAll(found.getEngines());
|
||||||
|
existing.setLegalBasis(found.getLegalBasis());
|
||||||
|
existing.setMatchedRule(found.getMatchedRule());
|
||||||
|
existing.setRedactionReason(found.getRedactionReason());
|
||||||
if (existing.getEntityType().equals(EntityType.RECOMMENDATION) && found.getEntityType().equals(EntityType.ENTITY)
|
if (existing.getEntityType().equals(EntityType.RECOMMENDATION) && found.getEntityType().equals(EntityType.ENTITY)
|
||||||
|| existing.getEntityType().equals(EntityType.ENTITY) && found.getEntityType().equals(EntityType.RECOMMENDATION)) {
|
|| existing.getEntityType().equals(EntityType.ENTITY) && found.getEntityType().equals(EntityType.RECOMMENDATION)) {
|
||||||
existing.setEntityType(EntityType.ENTITY);
|
existing.setEntityType(EntityType.ENTITY);
|
||||||
@ -230,6 +233,9 @@ public class EntitySearchUtils {
|
|||||||
}
|
}
|
||||||
var existingEntity = existingOptional.get();
|
var existingEntity = existingOptional.get();
|
||||||
existingEntity.getEngines().addAll(toAdd.getEngines());
|
existingEntity.getEngines().addAll(toAdd.getEngines());
|
||||||
|
existingEntity.setLegalBasis(toAdd.getLegalBasis());
|
||||||
|
existingEntity.setMatchedRule(toAdd.getMatchedRule());
|
||||||
|
existingEntity.setRedactionReason(toAdd.getRedactionReason());
|
||||||
} else {
|
} else {
|
||||||
existing.add(toAdd);
|
existing.add(toAdd);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user