adamsaghy commented on code in PR #2672:
URL: https://github.com/apache/fineract/pull/2672#discussion_r995848898


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/DefaultLoanLifecycleStateMachine.java:
##########
@@ -37,17 +37,20 @@ public DefaultLoanLifecycleStateMachine(LoanStatus[] 
allowedLoanStatuses, Busine
 
     @Override
     public LoanStatus dryTransition(final LoanEvent loanEvent, final Loan 
loan) {
-        return getNextState(loanEvent, loan);
+        LoanStatus nextStatus = getNextState(loanEvent, loan);
+        return nextStatus != null ? nextStatus : loan.status();
     }
 
     @Override
     public void transition(final LoanEvent loanEvent, final Loan loan) {
         LoanStatus newState = getNextState(loanEvent, loan);
-        loan.setLoanStatus(newState.getValue());
+        if (newState != null) {

Review Comment:
   Discussed. it works properly



-- 
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]

Reply via email to