BOM-933: Fix type mismatches in various migrations 5 (#22147)

* fix type mismatch in third_party_auth migrations

* fix type mismatch in verify_student  migrations

* fix type mismatch in video_config  migrations

* fix type mismatch in verified_track_content  migrations

* fix type mismatch in commercemigrations

* fix type mismatch in xblock_config migrations

* fix type mismatch in course_creators migrations

* fix type mismatch in contentstore migrations
This commit is contained in:
Manjinder Singh
2019-10-24 16:08:04 -04:00
committed by GitHub
parent 2ccbeda27d
commit 80c7f5af01
38 changed files with 198 additions and 196 deletions

View File

@@ -21,7 +21,7 @@ class Migration(migrations.Migration):
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
('checkout_on_ecommerce_service', models.BooleanField(default=False, help_text='Use the checkout page hosted by the E-Commerce service.')),
('single_course_checkout_page', models.CharField(default=b'/basket/single-item/', help_text='Path to single course checkout page hosted by the E-Commerce service.', max_length=255)),
('single_course_checkout_page', models.CharField(default=u'/basket/single-item/', help_text='Path to single course checkout page hosted by the E-Commerce service.', max_length=255)),
('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')),
],
options={

View File

@@ -19,6 +19,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='commerceconfiguration',
name='receipt_page',
field=models.CharField(default=b'/commerce/checkout/receipt/?orderNum=', help_text='Path to order receipt page.', max_length=255),
field=models.CharField(default=u'/commerce/checkout/receipt/?orderNum=', help_text='Path to order receipt page.', max_length=255),
),
]

View File

@@ -14,6 +14,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='commerceconfiguration',
name='receipt_page',
field=models.CharField(default=b'/checkout/receipt/?order_number=', help_text='Path to order receipt page.', max_length=255),
field=models.CharField(default=u'/checkout/receipt/?order_number=', help_text='Path to order receipt page.', max_length=255),
),
]

View File

@@ -18,6 +18,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='commerceconfiguration',
name='basket_checkout_page',
field=models.CharField(default=b'/basket/add/', help_text='Path to course(s) checkout page hosted by the E-Commerce service.', max_length=255),
field=models.CharField(default=u'/basket/add/', help_text='Path to course(s) checkout page hosted by the E-Commerce service.', max_length=255),
),
]

View File

@@ -32,7 +32,7 @@ class CommerceConfiguration(ConfigurationModel):
basket_checkout_page = models.CharField(
max_length=255,
default='/basket/add/',
default=u'/basket/add/',
help_text=_('Path to course(s) checkout page hosted by the E-Commerce service.')
)
cache_ttl = models.PositiveIntegerField(

View File

@@ -75,7 +75,7 @@ class Migration(migrations.Migration):
name='SoftwareSecurePhotoVerification',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('status', model_utils.fields.StatusField(default=b'created', max_length=100, verbose_name='status', no_check_for_status=True, choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')])),
('status', model_utils.fields.StatusField(default=u'created', max_length=100, verbose_name='status', no_check_for_status=True, choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')])),
('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, verbose_name='status changed', monitor='status')),
('name', models.CharField(max_length=255, blank=True)),
('face_image_url', models.URLField(max_length=255, blank=True)),
@@ -124,7 +124,7 @@ class Migration(migrations.Migration):
name='VerificationStatus',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('status', models.CharField(db_index=True, max_length=32, choices=[(b'submitted', b'submitted'), (b'approved', b'approved'), (b'denied', b'denied'), (b'error', b'error')])),
('status', models.CharField(db_index=True, max_length=32, choices=[(u'submitted', u'submitted'), (u'approved', u'approved'), (u'denied', u'denied'), (u'error', u'error')])),
('timestamp', models.DateTimeField(auto_now_add=True)),
('response', models.TextField(null=True, blank=True)),
('error', models.TextField(null=True, blank=True)),

View File

@@ -21,13 +21,13 @@ class Migration(migrations.Migration):
name='SSOVerification',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')),
('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')),
('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')),
('name', models.CharField(blank=True, max_length=255)),
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
('updated_at', models.DateTimeField(auto_now=True, db_index=True)),
('identity_provider_type', models.CharField(choices=[(b'third_party_auth.models.OAuth2ProviderConfig', b'OAuth2 Provider'), (b'third_party_auth.models.SAMLProviderConfig', b'SAML Provider'), (b'third_party_auth.models.LTIProviderConfig', b'LTI Provider')], default=b'third_party_auth.models.SAMLProviderConfig', help_text=b'Specifies which type of Identity Provider this verification originated from.', max_length=100)),
('identity_provider_slug', models.SlugField(default=b'default', help_text=b'The slug uniquely identifying the Identity Provider this verification originated from.', max_length=30)),
('identity_provider_type', models.CharField(choices=[(u'third_party_auth.models.OAuth2ProviderConfig', u'OAuth2 Provider'), (u'third_party_auth.models.SAMLProviderConfig', u'SAML Provider'), (u'third_party_auth.models.LTIProviderConfig', u'LTI Provider')], default=u'third_party_auth.models.SAMLProviderConfig', help_text=u'Specifies which type of Identity Provider this verification originated from.', max_length=100)),
('identity_provider_slug', models.SlugField(default=u'default', help_text=u'The slug uniquely identifying the Identity Provider this verification originated from.', max_length=30)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),

View File

@@ -22,7 +22,7 @@ class Migration(migrations.Migration):
name='IDVerificationAggregate',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')),
('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')),
('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')),
('name', models.CharField(blank=True, max_length=255)),
('object_id', models.PositiveIntegerField()),

View File

@@ -21,12 +21,12 @@ class Migration(migrations.Migration):
name='ManualVerification',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('status', model_utils.fields.StatusField(choices=[(b'created', b'created'), (b'ready', b'ready'), (b'submitted', b'submitted'), (b'must_retry', b'must_retry'), (b'approved', b'approved'), (b'denied', b'denied')], default=b'created', max_length=100, no_check_for_status=True, verbose_name='status')),
('status', model_utils.fields.StatusField(choices=[(u'created', u'created'), (u'ready', u'ready'), (u'submitted', u'submitted'), (u'must_retry', u'must_retry'), (u'approved', u'approved'), (u'denied', u'denied')], default=u'created', max_length=100, no_check_for_status=True, verbose_name='status')),
('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, monitor='status', verbose_name='status changed')),
('name', models.CharField(blank=True, max_length=255)),
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
('updated_at', models.DateTimeField(auto_now=True, db_index=True)),
('reason', models.CharField(blank=True, help_text=b'Specifies the reason for manual verification of the user.', max_length=255)),
('reason', models.CharField(blank=True, help_text=u'Specifies the reason for manual verification of the user.', max_length=255)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),

View File

@@ -101,7 +101,7 @@ class IDVerificationAttempt(StatusModel):
.. pii_types: name
.. pii_retirement: retained
"""
STATUS = Choices('created', 'ready', 'submitted', 'must_retry', 'approved', 'denied')
STATUS = Choices(u'created', u'ready', u'submitted', u'must_retry', u'approved', u'denied')
user = models.ForeignKey(User, db_index=True, on_delete=models.CASCADE)
# They can change their name later on, so we want to copy the value here so
@@ -160,7 +160,7 @@ class ManualVerification(IDVerificationAttempt):
max_length=255,
blank=True,
help_text=(
'Specifies the reason for manual verification of the user.'
u'Specifies the reason for manual verification of the user.'
)
)
@@ -190,13 +190,13 @@ class SSOVerification(IDVerificationAttempt):
.. no_pii:
"""
OAUTH2 = 'third_party_auth.models.OAuth2ProviderConfig'
SAML = 'third_party_auth.models.SAMLProviderConfig'
LTI = 'third_party_auth.models.LTIProviderConfig'
OAUTH2 = u'third_party_auth.models.OAuth2ProviderConfig'
SAML = u'third_party_auth.models.SAMLProviderConfig'
LTI = u'third_party_auth.models.LTIProviderConfig'
IDENTITY_PROVIDER_TYPE_CHOICES = (
(OAUTH2, 'OAuth2 Provider'),
(SAML, 'SAML Provider'),
(LTI, 'LTI Provider'),
(OAUTH2, u'OAuth2 Provider'),
(SAML, u'SAML Provider'),
(LTI, u'LTI Provider'),
)
identity_provider_type = models.CharField(
@@ -205,14 +205,14 @@ class SSOVerification(IDVerificationAttempt):
choices=IDENTITY_PROVIDER_TYPE_CHOICES,
default=SAML,
help_text=(
'Specifies which type of Identity Provider this verification originated from.'
u'Specifies which type of Identity Provider this verification originated from.'
)
)
identity_provider_slug = models.SlugField(
max_length=30, db_index=True, default='default',
max_length=30, db_index=True, default=u'default',
help_text=(
'The slug uniquely identifying the Identity Provider this verification originated from.'
u'The slug uniquely identifying the Identity Provider this verification originated from.'
))
class Meta(object):