RED-10697: Revert check technical name for legal basis on approval
This commit is contained in:
parent
f6550238b2
commit
75d65b0972
@ -51,9 +51,9 @@ public class ApprovalVerificationService {
|
|||||||
addWarning(entry, WarningType.LEGAL_BASIS_MISSING, approveResponse);
|
addWarning(entry, WarningType.LEGAL_BASIS_MISSING, approveResponse);
|
||||||
} else {
|
} else {
|
||||||
var legalBasisEntity = legalBasisMappings.stream()
|
var legalBasisEntity = legalBasisMappings.stream()
|
||||||
.filter(mapping -> mapping.getTechnicalName().equals(entry.getLegalBasis()))
|
.filter(mapping -> mapping.getReason().equals(entry.getLegalBasis()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
if (legalBasisEntity.isEmpty() || StringUtils.isEmpty(legalBasisEntity.get().getTechnicalName())) {
|
if (legalBasisEntity.isEmpty() || StringUtils.isEmpty(legalBasisEntity.get().getReason())) {
|
||||||
addWarning(entry, WarningType.UNMAPPED_JUSTIFICATION, approveResponse);
|
addWarning(entry, WarningType.UNMAPPED_JUSTIFICATION, approveResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@ public class ApprovalTest extends AbstractPersistenceServerServiceTest {
|
|||||||
.id("id1")
|
.id("id1")
|
||||||
.positions(List.of(new Position(1, 1, 1, 1, 1)))
|
.positions(List.of(new Position(1, 1, 1, 1, 1)))
|
||||||
.state(EntryState.APPLIED)
|
.state(EntryState.APPLIED)
|
||||||
.legalBasis("legal_basis")
|
.legalBasis("legalBasis")
|
||||||
.entryType(EntryType.ENTITY)
|
.entryType(EntryType.ENTITY)
|
||||||
.value("value")
|
.value("value")
|
||||||
.build()));
|
.build()));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user