check if attempt is None

This commit is contained in:
Matthew Foran 2022-05-23 21:36:02 -04:00
parent 16a421cd99
commit c99040ae47
1 changed files with 1 additions and 1 deletions

View File

@ -473,7 +473,7 @@ def findCourseAssignments(course):
hasattr(submission, "submission_comments") else ""
# Attempt
sub_view.attempt = submission.attempt if \
hasattr(submission, "attempt") else 0
hasattr(submission, "attempt") and submission.attempt is not None else 0
# User ID
sub_view.user_id = str(submission.user_id) if \
hasattr(submission, "user_id") else ""