Commit 21f09166 authored by Radheshhathwar's avatar Radheshhathwar
Browse files

Attendance null check changes

1 merge request!179Attendance null check changes
Showing with 3 additions and 2 deletions
+3 -2
......@@ -86,7 +86,7 @@ public class DataImporterService {
String columnName = columnNames.get(columnIndex);
try {
if (currentCell != null) { // Add this null check
if (currentCell != null) {
switch (currentCell.getCellType()) {
case STRING:
jsonObject.put(columnName, currentCell.getStringCellValue());
......@@ -119,9 +119,10 @@ public class DataImporterService {
}
return null;
})
.filter(Objects::nonNull) // Filter out rows with null values
.filter(jsonObj -> jsonObj != null) // Filter out rows with null values
.collect(Collectors.collectingAndThen(Collectors.toList(), JSONArray::new));
return jsonArray;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment