Fixed bug for GEPAFINBE-30
This commit is contained in:
@@ -15,6 +15,7 @@ import net.gepafin.tendermanagement.util.Utils;
|
|||||||
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.ResourceNotFoundException;
|
import net.gepafin.tendermanagement.web.rest.api.errors.ResourceNotFoundException;
|
||||||
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -247,17 +248,18 @@ public class FormDao {
|
|||||||
// Only map if the list is not empty and contains Strings
|
// Only map if the list is not empty and contains Strings
|
||||||
if (!list.isEmpty() && list.get(0) instanceof String) {
|
if (!list.isEmpty() && list.get(0) instanceof String) {
|
||||||
for (Object value : list) {
|
for (Object value : list) {
|
||||||
setFormFieldMap(fieldId, fieldValue, formFieldMap, value);
|
setFormFieldMap(fieldId, formFieldMap, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else setFormFieldMap(fieldId, fieldValue, formFieldMap, fieldValue);
|
else setFormFieldMap(fieldId, formFieldMap, fieldValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setFormFieldMap(String fieldId, Object fieldValue, Map<String, Object> formFieldMap, Object value) {
|
private void setFormFieldMap(String fieldId, Map<String, Object> formFieldMap, Object value) {
|
||||||
if (value instanceof String) {
|
if (value instanceof String) {
|
||||||
if(fieldValue !=null && ((String) fieldValue).isEmpty())
|
if(value !=null && Boolean.FALSE.equals(StringUtils.isEmpty((String)value))) {
|
||||||
formFieldMap.put(fieldId, value);
|
formFieldMap.put(fieldId, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user