Skip to content

Commit

Permalink
fix: Added catch to not found exception
Browse files Browse the repository at this point in the history
  • Loading branch information
rijuma committed Sep 4, 2024
1 parent d0cacdb commit 5d3ff14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions edx_name_affirmation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 65 in edx_name_affirmation/models.py

View workflow job for this annotation

GitHub Actions / Tests (ubuntu-20.04, 3.8, 10, django42)

Missing coverage

Missing coverage on lines 64-65

class VerifiedNameConfig(ConfigurationModel):
"""
Expand Down

0 comments on commit 5d3ff14

Please sign in to comment.