fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vorbur...@apache.org
Subject [fineract] branch develop updated: FINERACT-1091: Adding validation for constitution ID (#1189)
Date Sun, 19 Jul 2020 13:49:39 GMT
This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 6ee3ff2  FINERACT-1091: Adding validation for constitution ID (#1189)
6ee3ff2 is described below

commit 6ee3ff2452ca856f2d8db46595f9938a0871e1c1
Author: Petri Tuomola <ptuomola@users.noreply.github.com>
AuthorDate: Sun Jul 19 16:49:32 2020 +0300

    FINERACT-1091: Adding validation for constitution ID (#1189)
    
    
    Co-authored-by: Michael Vorburger ⛑️ <mike@vorburger.ch>
---
 .../org/apache/fineract/portfolio/client/domain/ClientNonPerson.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPerson.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPerson.java
index e7d16c6..535e2ad 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPerson.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPerson.java
@@ -113,6 +113,11 @@ public class ClientNonPerson extends AbstractPersistableCustom {
         final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
         validateIncorpValidityTillDate(client, dataValidationErrors);
 
+        if (this.constitution == null) {
+            dataValidationErrors.add(ApiParameterError.parameterError("error.msg.clients.constitutionid.is.null",
"Constitution ID may not be null",
+                    ClientApiConstants.constitutionIdParamName));
+        }
+
         if (!dataValidationErrors.isEmpty()) {
             throw new PlatformApiDataValidationException(dataValidationErrors);
         }


Mime
View raw message