You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2018/10/04 13:15:11 UTC

[GitHub] ShruthiRajaram closed pull request #461: FINERACT-611 unable to create share product

ShruthiRajaram closed pull request #461: FINERACT-611 unable to create share product
URL: https://github.com/apache/fineract/pull/461
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java
index 9dbb75e26..4b517e8eb 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java
@@ -118,10 +118,11 @@ public ShareProduct validateAndCreate(JsonCommand jsonCommand) {
         final String shortName = this.fromApiJsonHelper.extractStringNamed(ShareProductApiConstants.shortname_paramname, element);
         baseDataValidator.reset().parameter(ShareProductApiConstants.shortname_paramname).value(shortName).notBlank()
                 .notExceedingLengthOf(4);
-        String description = null;
-        if (this.fromApiJsonHelper.parameterExists(ShareProductApiConstants.description_paramname, element)) {
-            description = this.fromApiJsonHelper.extractStringNamed(ShareProductApiConstants.description_paramname, element);
-        }
+        
+		final String description = this.fromApiJsonHelper
+				.extractStringNamed(ShareProductApiConstants.description_paramname, element);
+		baseDataValidator.reset().parameter(ShareProductApiConstants.description_paramname).value(description)
+				.notBlank().notExceedingLengthOf(500);
 
         String externalId = this.fromApiJsonHelper.extractStringNamed(ShareProductApiConstants.externalid_paramname, element);
         // baseDataValidator.reset().parameter(ShareProductApiConstants.externalid_paramname).value(externalId).notBlank();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services