From 033567752b107d6371791286d348f52743278e23 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 3 Jan 2017 12:01:08 -0500 Subject: [PATCH] Submissions scores can be too quick It's possible this score has not been logged yet, we should handle that. TNL-6236 --- lms/djangoapps/grades/tasks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lms/djangoapps/grades/tasks.py b/lms/djangoapps/grades/tasks.py index 88384cf6e5..d213ec46e2 100644 --- a/lms/djangoapps/grades/tasks.py +++ b/lms/djangoapps/grades/tasks.py @@ -135,6 +135,9 @@ def _has_database_updated_with_new_score( "item_type": "openassessment" } ) + if api_score is None: + # Same case as the initial 'if' above, for submissions-specific scores + return score_deleted reported_modified_time = api_score.created_at else: reported_modified_time = score.modified