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);
|
||||
} else {
|
||||
var legalBasisEntity = legalBasisMappings.stream()
|
||||
.filter(mapping -> mapping.getTechnicalName().equals(entry.getLegalBasis()))
|
||||
.filter(mapping -> mapping.getReason().equals(entry.getLegalBasis()))
|
||||
.findFirst();
|
||||
if (legalBasisEntity.isEmpty() || StringUtils.isEmpty(legalBasisEntity.get().getTechnicalName())) {
|
||||
if (legalBasisEntity.isEmpty() || StringUtils.isEmpty(legalBasisEntity.get().getReason())) {
|
||||
addWarning(entry, WarningType.UNMAPPED_JUSTIFICATION, approveResponse);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class ApprovalTest extends AbstractPersistenceServerServiceTest {
|
||||
.id("id1")
|
||||
.positions(List.of(new Position(1, 1, 1, 1, 1)))
|
||||
.state(EntryState.APPLIED)
|
||||
.legalBasis("legal_basis")
|
||||
.legalBasis("legalBasis")
|
||||
.entryType(EntryType.ENTITY)
|
||||
.value("value")
|
||||
.build()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user