adamsaghy commented on code in PR #3611:
URL: https://github.com/apache/fineract/pull/3611#discussion_r1427271732
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java:
##########
@@ -784,6 +784,13 @@ public void validateForCreate(final JsonCommand command) {
final String loanScheduleType =
this.fromApiJsonHelper.extractStringNamed(LoanProductConstants.LOAN_SCHEDULE_TYPE,
element);
baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_TYPE).value(loanScheduleType).ignoreIfNull()
.isOneOfEnumValues(LoanScheduleType.class);
+ if
(!LoanScheduleType.PROGRESSIVE.equals(LoanScheduleType.valueOf(loanScheduleType))
Review Comment:
For backward compatibility, the loan schedule type is optional. So it might
not be sent, in that case the `CUMULATIVE` is the fallback default value. You
might wanna mimic that behaviour here as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]