diff --git a/omod/src/main/java/org/openmrs/module/reportingrest/web/resource/DataSetMetaDataConverter.java b/omod/src/main/java/org/openmrs/module/reportingrest/web/resource/DataSetMetaDataConverter.java index 0a6e3c8..8dc224d 100644 --- a/omod/src/main/java/org/openmrs/module/reportingrest/web/resource/DataSetMetaDataConverter.java +++ b/omod/src/main/java/org/openmrs/module/reportingrest/web/resource/DataSetMetaDataConverter.java @@ -37,7 +37,7 @@ public SimpleObject asRepresentation(DataSetMetaData metadata, Representation re Map columnMap = new HashMap(); columnMap.put("name", column.getName()); columnMap.put("label", column.getLabel()); - columnMap.put("datatype", column.getDataType().getName()); + columnMap.put("datatype", column.getDataType() == null ? "null" : column.getDataType().getName()); columns.add(columnMap); }