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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java:
##########
@@ -1662,10 +1664,10 @@ public void modifyApplication(final JsonCommand 
command, final Map<String, Objec
             this.accountNumber = StringUtils.defaultIfEmpty(newValue, null);
         }
 
-        if 
(command.isChangeInStringParameterNamed(SavingsApiConstants.externalIdParamName,
 this.externalId)) {
+        if 
(command.isChangeInStringParameterNamed(SavingsApiConstants.externalIdParamName,
 this.externalId.getValue())) {
             final String newValue = 
command.stringValueOfParameterNamed(SavingsApiConstants.externalIdParamName);
             actualChanges.put(SavingsApiConstants.externalIdParamName, 
newValue);
-            this.externalId = StringUtils.defaultIfEmpty(newValue, null);
+            this.externalId = ExternalIdFactory.produce(newValue);

Review Comment:
   Here we should generate one if nothing was provided: 
`ExternalIdFactory.create(...)`



##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java:
##########
@@ -323,10 +324,10 @@ public SavingsAccount assembleFrom(final JsonCommand 
command, final AppUser subm
         }
 
         final SavingsAccount account = 
SavingsAccount.createNewApplicationForSubmittal(client, group, product, 
fieldOfficer, accountNo,
-                externalId, accountType, submittedOnDate, submittedBy, 
interestRate, interestCompoundingPeriodType,
-                interestPostingPeriodType, interestCalculationType, 
interestCalculationDaysInYearType, minRequiredOpeningBalance,
-                lockinPeriodFrequency, lockinPeriodFrequencyType, 
iswithdrawalFeeApplicableForTransfer, charges, allowOverdraft,
-                overdraftLimit, enforceMinRequiredBalance, minRequiredBalance, 
maxAllowedLienLimit, lienAllowed,
+                ExternalIdFactory.produce(externalId), accountType, 
submittedOnDate, submittedBy, interestRate,

Review Comment:
   Here we should generate one if nothing was provided: 
`ExternalIdFactory.create(...)`



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