FINERACT-1724 - Remove Restriction from faurd mark

This commit is contained in:
Janos Haber
2023-04-22 23:26:45 +02:00
committed by Adam Saghy
parent cefcb53424
commit 1d86a8f0cb
2 changed files with 47 additions and 43 deletions
@@ -2521,11 +2521,6 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
Loan loan = this.loanAssembler.assembleFrom(loanId);
final Map<String, Object> changes = new LinkedHashMap<>();
if (!loan.isOpen()) {
throw new GeneralPlatformDomainRuleException("error.msg.loan.mark.as.fraud.not.allowed",
"Loan Id: " + loanId + " mark as fraud is not allowed as loan status is not active", loan.getStatus().getCode());
}
final boolean fraud = command.booleanPrimitiveValueOfParameterNamed(LoanApiConstants.FRAUD_ATTRIBUTE_NAME);
if (loan.isFraud() != fraud) {
loan.markAsFraud(fraud);