Skip to content

Commit

Permalink
Merge pull request #34 from ojwanganto/check-exemptions-if-set
Browse files Browse the repository at this point in the history
fix check for unset exemptions config
  • Loading branch information
ojwanganto authored Sep 4, 2024
2 parents a3c6ee1 + e0614be commit f659061
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/
package org.openmrs.module.kenyaemr.cashier.exemptions;

import org.apache.commons.lang3.StringUtils;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.node.ArrayNode;
Expand Down Expand Up @@ -45,7 +46,7 @@ public void buildBillingExemptionList() {
String exemptionConfig = adminService.getGlobalProperty("kenyaemr.billing.exemptions");
ObjectNode config = null;

if (exemptionConfig != null) {
if (StringUtils.isNotBlank(exemptionConfig)) {
ObjectMapper mapper = new ObjectMapper();
try {
config = (ObjectNode) mapper.readTree(exemptionConfig);
Expand Down

0 comments on commit f659061

Please sign in to comment.