diff --git a/edx_name_affirmation/models.py b/edx_name_affirmation/models.py index f0e0728..9a4c3a0 100644 --- a/edx_name_affirmation/models.py +++ b/edx_name_affirmation/models.py @@ -57,12 +57,12 @@ def verification_attempt_status(self): if not self.verification_attempt_id or not SoftwareSecurePhotoVerification: return None - # breakpoint() - - verification = SoftwareSecurePhotoVerification.objects.get(id=self.verification_attempt_id) - - return verification.status if verification else None + try: + verification = SoftwareSecurePhotoVerification.objects.get(id=self.verification_attempt_id) + return verification.status if verification else None + except SoftwareSecurePhotoVerification.DoesNotExist: + return None class VerifiedNameConfig(ConfigurationModel): """