RED-5624: Refactoring of justifications
readded decription to reports changed filter to filter out null technicalnames
This commit is contained in:
parent
030aafcc5f
commit
ddc16419e9
@ -190,9 +190,17 @@ public class EntityLogConverterService {
|
||||
private static String getJustificationReason(List<EntityLogLegalBasis> legalBasisMappings, EntityLogEntry entry) {
|
||||
|
||||
return legalBasisMappings.stream()
|
||||
.filter((EntityLogLegalBasis lbm) -> lbm.getTechnicalName().equalsIgnoreCase(entry.getLegalBasis()))
|
||||
.filter((EntityLogLegalBasis lbm) -> {
|
||||
if (lbm.getTechnicalName() == null) {
|
||||
return false;
|
||||
}
|
||||
if (lbm.getTechnicalName().equalsIgnoreCase(entry.getLegalBasis())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
.findAny()
|
||||
.map(EntityLogLegalBasis::getTechnicalName)
|
||||
.map(EntityLogLegalBasis::getDescription)
|
||||
.orElse("");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user