Skip to content

Commit

Permalink
feat: switching to a defined enum
Browse files Browse the repository at this point in the history
feedback from code review

FIXES: APER-1322
  • Loading branch information
deborahgu committed Jan 29, 2024
1 parent 5fedbc6 commit 1c049a3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from django.db import migrations

from lms.djangoapps.certificates.data import CertificateStatuses


class Migration(migrations.Migration):
"""
Expand All @@ -18,7 +20,9 @@ def make_invalid_certificates_unavailable(apps, schema_editor):

GeneratedCertificate.objects.filter(
certificateinvalidation__active=True
).exclude(status="unavailable").update(status="unavailable")
).exclude(status=CertificateStatuses.unavailable).update(
status=CertificateStatuses.unavailable
)

operations = [
migrations.RunPython(
Expand Down

0 comments on commit 1c049a3

Please sign in to comment.