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


##########
fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorHelper.java:
##########
@@ -62,10 +62,27 @@ public Long findOrCreateOriginatorId(final 
LoanApplicationOriginatorData data) {
             if (!isOriginatorCreationDuringLoanApplicationEnabled()) {
                 throw new 
LoanOriginatorCreationNotAllowedException(data.getExternalId());
             }
-            return createNewOriginator(data, externalId).getId();
+            return createNewOriginator(data, externalId, "during loan 
application").getId();
         });
     }
 
+    /**
+     * Finds an active originator by external ID, or creates it for a loan 
disbursement without checking the
+     * application-time originator creation feature flag.
+     *
+     * @param data
+     *            originator request data containing the external ID and 
optional metadata for creation
+     * @return the existing or newly created originator ID
+     */
+    @Transactional(propagation = Propagation.REQUIRES_NEW)

Review Comment:
   we dont need new transaction



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