Github user pramodn02 commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/63#discussion_r60220623
  
    --- Diff: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java
 ---
    @@ -711,9 +699,67 @@ public CommandProcessingResult modifyApplication(final 
Long loanId, final JsonCo
                         this.calendarInstanceRepository.save(calendarInstance);
                     }
     
    -            } else if (ciList != null && !ciList.isEmpty()) {
    -                final CalendarInstance calendarInstance = ciList.get(0);
    -                this.calendarInstanceRepository.delete(calendarInstance);
    +            } else {
    +                if (ciList != null && !ciList.isEmpty()) {
    +                    final CalendarInstance existingCalendarInstance = 
ciList.get(0);
    +                    final boolean isCalendarAssociatedWithEntity = 
this.calendarReadPlatformService.isCalendarAssociatedWithEntity(
    --- End diff --
    
    As per the code this will always returns true since you are passing all 
values from the calendar instance (which is retrieved from DB). can you please 
let me know if you are getting false with any scenario?  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to