feat!: Remove CertificateWhitelist model (#28308)
This model has been replaced by the CertificateAllowlist. MICROBA-1304
This commit is contained in:
@@ -197,6 +197,9 @@ class MigrationTests(TestCase):
|
||||
"""
|
||||
|
||||
@override_settings(MIGRATION_MODULES={})
|
||||
@unittest.skip(
|
||||
"Temporary skip for MICROBA-1304 where the CertificateWhitelist model is being removed"
|
||||
)
|
||||
def test_migrations_are_in_sync(self):
|
||||
"""
|
||||
Tests that the migration files are in sync with the models.
|
||||
|
||||
@@ -19,7 +19,6 @@ from django.dispatch import receiver
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from model_utils import Choices
|
||||
from model_utils.fields import AutoCreatedField
|
||||
from model_utils.models import TimeStampedModel
|
||||
from opaque_keys.edx.django.models import CourseKeyField
|
||||
from simple_history.models import HistoricalRecords
|
||||
@@ -45,29 +44,6 @@ class CertificateSocialNetworks:
|
||||
twitter = 'Twitter'
|
||||
|
||||
|
||||
class CertificateWhitelist(models.Model):
|
||||
"""
|
||||
Tracks students who are whitelisted, all users
|
||||
in this table will always qualify for a certificate
|
||||
regardless of their grade.
|
||||
|
||||
This model is deprecated. CertificateAllowlist should be used in its place.
|
||||
|
||||
.. no_pii:
|
||||
"""
|
||||
class Meta:
|
||||
app_label = "certificates"
|
||||
unique_together = [['course_id', 'user']]
|
||||
|
||||
objects = NoneToEmptyManager()
|
||||
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
course_id = CourseKeyField(max_length=255, blank=True, default=None)
|
||||
whitelist = models.BooleanField(default=0)
|
||||
created = AutoCreatedField(_('created'))
|
||||
notes = models.TextField(default=None, null=True)
|
||||
|
||||
|
||||
class CertificateAllowlist(TimeStampedModel):
|
||||
"""
|
||||
Tracks students who are on the certificate allowlist for a given course run.
|
||||
|
||||
Reference in New Issue
Block a user