BOM-933: Fix type mismatches in various migrations 2 (#22115)
* Fix type mismatches in track migrations * Fix type mismatches in oauth_dispatch * Fix type mismatches in badges migrations * fix type mismatch in contentserver migrations * Fix type mismatches in mobile_api migrations * fix type mismatch in crawlers migrations * fix type mismatch in dark_lang migrations * fix type mismatch in branding migrations
This commit is contained in:
@@ -20,7 +20,7 @@ class Migration(migrations.Migration):
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
|
||||
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
|
||||
('cache_ttl', models.PositiveIntegerField(default=0, help_text=b'The time, in seconds, to report that a course asset is allowed to be cached for.')),
|
||||
('cache_ttl', models.PositiveIntegerField(default=0, help_text=u'The time, in seconds, to report that a course asset is allowed to be cached for.')),
|
||||
('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -20,7 +20,7 @@ class Migration(migrations.Migration):
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
|
||||
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
|
||||
('cdn_user_agents', models.TextField(default=b'Amazon CloudFront', help_text=b'A newline-separated list of user agents that should be considered CDNs.')),
|
||||
('cdn_user_agents', models.TextField(default=u'Amazon CloudFront', help_text=u'A newline-separated list of user agents that should be considered CDNs.')),
|
||||
('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -24,7 +24,7 @@ class CourseAssetCacheTtlConfig(ConfigurationModel):
|
||||
|
||||
cache_ttl = PositiveIntegerField(
|
||||
default=0,
|
||||
help_text="The time, in seconds, to report that a course asset is allowed to be cached for."
|
||||
help_text=u"The time, in seconds, to report that a course asset is allowed to be cached for."
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@@ -51,8 +51,8 @@ class CdnUserAgentsConfig(ConfigurationModel):
|
||||
app_label = 'contentserver'
|
||||
|
||||
cdn_user_agents = TextField(
|
||||
default='Amazon CloudFront',
|
||||
help_text="A newline-separated list of user agents that should be considered CDNs."
|
||||
default=u'Amazon CloudFront',
|
||||
help_text=u"A newline-separated list of user agents that should be considered CDNs."
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -19,7 +19,7 @@ class Migration(migrations.Migration):
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
|
||||
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
|
||||
('known_user_agents', models.TextField(default=b'edX-downloader', help_text=b'A comma-separated list of known crawler user agents.', blank=True)),
|
||||
('known_user_agents', models.TextField(default=u'edX-downloader', help_text=u'A comma-separated list of known crawler user agents.', blank=True)),
|
||||
('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={
|
||||
|
||||
@@ -22,8 +22,8 @@ class CrawlersConfig(ConfigurationModel):
|
||||
|
||||
known_user_agents = models.TextField(
|
||||
blank=True,
|
||||
help_text="A comma-separated list of known crawler user agents.",
|
||||
default='edX-downloader',
|
||||
help_text=u"A comma-separated list of known crawler user agents.",
|
||||
default=u'edX-downloader',
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
@@ -19,7 +19,7 @@ class Migration(migrations.Migration):
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')),
|
||||
('enabled', models.BooleanField(default=False, verbose_name='Enabled')),
|
||||
('released_languages', models.TextField(help_text=b'A comma-separated list of language codes to release to the public.', blank=True)),
|
||||
('released_languages', models.TextField(help_text=u'A comma-separated list of language codes to release to the public.', blank=True)),
|
||||
('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={
|
||||
|
||||
@@ -15,11 +15,11 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='darklangconfig',
|
||||
name='beta_languages',
|
||||
field=models.TextField(blank=True, help_text=b'A comma-separated list of language codes to release to the public as beta languages.'),
|
||||
field=models.TextField(blank=True, help_text=u'A comma-separated list of language codes to release to the public as beta languages.'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='darklangconfig',
|
||||
name='enable_beta_languages',
|
||||
field=models.BooleanField(default=False, help_text=b'Enable partially supported languages to display in language drop down.'),
|
||||
field=models.BooleanField(default=False, help_text=u'Enable partially supported languages to display in language drop down.'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -17,15 +17,15 @@ class DarkLangConfig(ConfigurationModel):
|
||||
"""
|
||||
released_languages = models.TextField(
|
||||
blank=True,
|
||||
help_text="A comma-separated list of language codes to release to the public."
|
||||
help_text=u"A comma-separated list of language codes to release to the public."
|
||||
)
|
||||
enable_beta_languages = models.BooleanField(
|
||||
default=False,
|
||||
help_text="Enable partially supported languages to display in language drop down."
|
||||
help_text=u"Enable partially supported languages to display in language drop down."
|
||||
)
|
||||
beta_languages = models.TextField(
|
||||
blank=True,
|
||||
help_text="A comma-separated list of language codes to release to the public as beta languages."
|
||||
help_text=u"A comma-separated list of language codes to release to the public as beta languages."
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
@@ -39,7 +39,7 @@ class Migration(migrations.Migration):
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('short_name', models.CharField(help_text='The short_name of an existing Organization.', max_length=255)),
|
||||
('provider_type', models.CharField(choices=[(b'content_org', 'Content Provider')], default=b'content_org', max_length=32)),
|
||||
('provider_type', models.CharField(choices=[(u'content_org', 'Content Provider')], default=u'content_org', max_length=32)),
|
||||
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='organizations', to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -29,7 +29,7 @@ class Migration(migrations.Migration):
|
||||
name='ApplicationOrganization',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('relation_type', models.CharField(choices=[(b'content_org', 'Content Provider')], default=b'content_org', max_length=32)),
|
||||
('relation_type', models.CharField(choices=[(u'content_org', 'Content Provider')], default=u'content_org', max_length=32)),
|
||||
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='organizations', to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)),
|
||||
('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organizations.Organization')),
|
||||
],
|
||||
|
||||
@@ -104,7 +104,7 @@ class ApplicationOrganization(models.Model):
|
||||
|
||||
.. no_pii:
|
||||
"""
|
||||
RELATION_TYPE_CONTENT_ORG = 'content_org'
|
||||
RELATION_TYPE_CONTENT_ORG = u'content_org'
|
||||
RELATION_TYPES = (
|
||||
(RELATION_TYPE_CONTENT_ORG, _('Content Provider')),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user