vidakovic commented on code in PR #2553:
URL: https://github.com/apache/fineract/pull/2553#discussion_r958208179


##########
fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java:
##########
@@ -265,8 +266,14 @@ private AccountingRuleData 
handleTemplate(AccountingRuleData accountingRuleData)
                 allowedDebitTagOptions = allowedTagOptions;
             }
 
-            accountingRuleData = new AccountingRuleData(accountingRuleData, 
allowedAccounts, allowedOffices, allowedCreditTagOptions,
-                    allowedDebitTagOptions);
+            accountingRuleData = new 
AccountingRuleData().setId(accountingRuleData.getId()).setOfficeId(accountingRuleData.getOfficeId())

Review Comment:
   In the original code only 4 properties are set with values... why do more 
here? I think we should stick as close to the original intention as possible to 
avoid any kind of side effects.



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