Skip to content

Commit decfa9b

Browse files
committed
Don't log for empty rows
This is currently super noisy, because column 5 is a drop-down so is never considered empty. Instead, only log if the first cell of the row is non-empty, and there weren't enough columns for that row.
1 parent ec6a984 commit decfa9b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/mentoring.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ pub async fn get_mentoring_records(
5555

5656
for (row_number, row) in sheet_data.row_data.into_iter().enumerate() {
5757
let cells = row.values;
58-
if cells.len() < 6 {
58+
if cells.is_empty() {
59+
continue;
60+
}
61+
if cells.len() < 6 && !cell_string(&cells[0]).is_empty() {
5962
warn!(
6063
"Parsing mentoring data from Google Sheet with ID {}: Not enough columns for row {} - expected at least 6, got {} containing: {}",
6164
mentoring_records_sheet_id,

0 commit comments

Comments
 (0)