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


##########
fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java:
##########
@@ -66,4 +63,17 @@ public ApplicationCurrency 
findOneWithNotFoundDetection(final String currencyCod
         }
         return applicationCurrency;
     }
+
+    public Boolean existsByCode(String code) {
+        return repository.existsByCode(code);
+    }
+
+    public ApplicationCurrency save(ApplicationCurrency currency) {
+        if (existsByCode(currency.getCode())) {

Review Comment:
   Please do the validation as one of the first step in the service! Validation 
errors should be raised ASAP!



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