From 6584f8119877529bfde1a2821821f33d6536b544 Mon Sep 17 00:00:00 2001 From: Feanil Patel <feanil@edx.org> Date: Mon, 21 Oct 2019 10:54:31 -0400 Subject: [PATCH] Fix type mismatches in the course_groups migration. Mixing byte and unicode strings causes migrations to fail. --- .../course_groups/migrations/0001_initial.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/openedx/core/djangoapps/course_groups/migrations/0001_initial.py b/openedx/core/djangoapps/course_groups/migrations/0001_initial.py index 3bcf87d3733..f8b634a13da 100644 --- a/openedx/core/djangoapps/course_groups/migrations/0001_initial.py +++ b/openedx/core/djangoapps/course_groups/migrations/0001_initial.py @@ -24,7 +24,7 @@ class Migration(migrations.Migration): name='CourseCohort', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('assignment_type', models.CharField(default=b'manual', max_length=20, choices=[(b'random', b'Random'), (b'manual', b'Manual')])), + ('assignment_type', models.CharField(default='manual', max_length=20, choices=[('random', 'Random'), ('manual', 'Manual')])), ], ), migrations.CreateModel( @@ -32,8 +32,8 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('is_cohorted', models.BooleanField(default=False)), - ('course_id', CourseKeyField(help_text=b'Which course are these settings associated with?', unique=True, max_length=255, db_index=True)), - ('_cohorted_discussions', models.TextField(null=True, db_column=b'cohorted_discussions', blank=True)), + ('course_id', CourseKeyField(help_text='Which course are these settings associated with?', unique=True, max_length=255, db_index=True)), + ('_cohorted_discussions', models.TextField(null=True, db_column='cohorted_discussions', blank=True)), ('always_cohort_inline_discussions', models.BooleanField(default=True)), ], ), @@ -41,18 +41,18 @@ class Migration(migrations.Migration): name='CourseUserGroup', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('name', models.CharField(help_text=b'What is the name of this group? Must be unique within a course.', max_length=255)), - ('course_id', CourseKeyField(help_text=b'Which course is this group associated with?', max_length=255, db_index=True)), - ('group_type', models.CharField(max_length=20, choices=[(b'cohort', b'Cohort')])), - ('users', models.ManyToManyField(help_text=b'Who is in this group?', related_name='course_groups', to=settings.AUTH_USER_MODEL, db_index=True)), + ('name', models.CharField(help_text='What is the name of this group? Must be unique within a course.', max_length=255)), + ('course_id', CourseKeyField(help_text='Which course is this group associated with?', max_length=255, db_index=True)), + ('group_type', models.CharField(max_length=20, choices=[('cohort', 'Cohort')])), + ('users', models.ManyToManyField(help_text='Who is in this group?', related_name='course_groups', to=settings.AUTH_USER_MODEL, db_index=True)), ], ), migrations.CreateModel( name='CourseUserGroupPartitionGroup', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('partition_id', models.IntegerField(help_text=b'contains the id of a cohorted partition in this course')), - ('group_id', models.IntegerField(help_text=b'contains the id of a specific group within the cohorted partition')), + ('partition_id', models.IntegerField(help_text='contains the id of a cohorted partition in this course')), + ('group_id', models.IntegerField(help_text='contains the id of a specific group within the cohorted partition')), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('course_user_group', models.OneToOneField(to='course_groups.CourseUserGroup', on_delete=models.CASCADE)), -- GitLab