Skip to content

Commit

Permalink
fix: update course and course_run card_image_url length to 500
Browse files Browse the repository at this point in the history
  • Loading branch information
hinakhadim committed Oct 12, 2023
1 parent f6105c8 commit 6894bfe
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.20 on 2023-10-12 08:21

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('course_metadata', '0321_add_verified_only_course_type'),
]

operations = [
migrations.AlterField(
model_name='course',
name='card_image_url',
field=models.URLField(blank=True, max_length=500, null=True),
),
migrations.AlterField(
model_name='courserun',
name='card_image_url',
field=models.URLField(blank=True, max_length=500, null=True),
),
migrations.AlterField(
model_name='historicalcourse',
name='card_image_url',
field=models.URLField(blank=True, max_length=500, null=True),
),
migrations.AlterField(
model_name='historicalcourserun',
name='card_image_url',
field=models.URLField(blank=True, max_length=500, null=True),
),
]
4 changes: 2 additions & 2 deletions course_discovery/apps/course_metadata/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ class Course(DraftModelMixin, PkSearchableMixin, CachedMixin, TimeStampedModel):
outcome = NullHtmlField()
prerequisites_raw = NullHtmlField()
syllabus_raw = NullHtmlField()
card_image_url = models.URLField(null=True, blank=True)
card_image_url = models.URLField(null=True, blank=True, max_length=500)
image = StdImageField(
upload_to=UploadToFieldNamePath(populate_from='uuid', path='media/course/image'),
blank=True,
Expand Down Expand Up @@ -1860,7 +1860,7 @@ class CourseRun(DraftModelMixin, CachedMixin, TimeStampedModel):
)

# TODO Ditch this, and fallback to the course
card_image_url = models.URLField(null=True, blank=True)
card_image_url = models.URLField(null=True, blank=True, max_length=500)
video = models.ForeignKey(Video, models.CASCADE, default=None, null=True, blank=True)
video_translation_languages = models.ManyToManyField(
LanguageTag, blank=True, related_name='+')
Expand Down

0 comments on commit 6894bfe

Please sign in to comment.