Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lms/djangoapps/certificates/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('mode', models.CharField(help_text='The course mode for this badge image. For example, "verified" or "honor".', unique=True, max_length=125)),
('icon', models.ImageField(help_text='Badge images must be square PNG files. The file size should be under 250KB.', upload_to=b'badges', validators=[validate_badge_image])),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upload_to a string instead of bytes

('icon', models.ImageField(help_text='Badge images must be square PNG files. The file size should be under 250KB.', upload_to='badges', validators=[validate_badge_image])),
('default', models.BooleanField(default=False, help_text='Set this value to True if you want this image to be the default image for any course modes that do not have a specified badge image. You can have only one default image.')),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def add_api_access_group(apps, schema_editor):

group, __ = Group.objects.get_or_create(name=API_GROUP_NAME)
api_content_type = ContentType.objects.get_for_model(ApiAccessRequest)
group.permissions = Permission.objects.filter(content_type=api_content_type)
group.permissions.set(Permission.objects.filter(content_type=api_content_type))
group.save()


Expand Down