From fe3e4d968a78d5c3e624c007ada93e66aa17bf9f Mon Sep 17 00:00:00 2001 From: Leon Kuchenbecker Date: Sat, 23 May 2020 11:53:03 +0200 Subject: [PATCH] Ignore empty comments. Fixes #10. --- src/assignmenttool/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/assignmenttool/__init__.py b/src/assignmenttool/__init__.py index b776be1..a458a4e 100755 --- a/src/assignmenttool/__init__.py +++ b/src/assignmenttool/__init__.py @@ -150,6 +150,8 @@ def process(config): raise AToolError(f'Could not find maximum score for task {task}') record['score'] = row.Value elif row.Type.upper() == 'COMMENT': + if pd.isna(row.Value): + continue # Ignore empty comments # Check if this is a comment that applies to the entire sheet if pd.isna(row.Task) and pd.isna(row.Subtask): sheet_comments[row.Username].append(row.Value)