RusokeMarvin commented on PR #6685:
URL: https://github.com/apache/fineract/pull/6685#issuecomment-6324284788

   Thanks for the review @galovics , I've updated the PR.
   
   I moved the fix into retriveLoanCounter like you suggested, using 
COALESCE(MAX(...), 0) in both overloads, and dropped the validator changes 
along with the comments.
   
   About the other two paths: I checked, and the retriveLoanCounter calls in 
LoanScheduleCalculationPlatformServiceImpl and 
LoanApplicationWritePlatformServiceJpaRepositoryImpl were there up to 1.10.0. 
They were removed in FINERACT-2090 (92e291a9e4), which moved the borrower cycle 
check into LoanApplicationValidator. So on develop the only callers left are 
the validator, the loan template in LoanReadPlatformServiceImpl and the group 
template in LoansApiResource, and all of them get 0 now. The other counter 
lookups in LoanWritePlatformServiceJpaRepositoryImpl already handle null.
   
   I also added LoanApplicationBorrowerCycleTest, which creates a borrower 
cycle product and a new client with no loans and submits a loan application. It 
passes locally. Everything is squashed into one commit under FINERACT-2034.
   
   Let me know if I missed anything.
   
   


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