fix: Add check for existence of grade (#28348)

MICROBA-678
This commit is contained in:
Christie Rice
2021-08-02 13:07:52 -04:00
committed by GitHub
parent 68a32df5d7
commit 4996b40860

View File

@@ -600,7 +600,7 @@ def _cert_info(user, enrollment, cert_status):
if (
status_dict['status'] != CertificateStatuses.downloadable and
(cert_generation_enabled(course_overview.id) or auto_certificate_generation_enabled()) and
persisted_grade.passed
persisted_grade and persisted_grade.passed
):
status_dict['status'] = CertificateStatuses.requesting