Skip to content

Commit

Permalink
fix check for unset exemptions config
Browse files Browse the repository at this point in the history
  • Loading branch information
ojwanganto committed Sep 4, 2024
1 parent a3c6ee1 commit e0614be
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 e0614be

Please sign in to comment.