Commit d1c42b13 by Matthew Piatetsky

Add short description to course object in program response

LEARNER-1887
parent eb0f4dd7
...@@ -535,7 +535,7 @@ class MinimalCourseSerializer(TimestampModelSerializer): ...@@ -535,7 +535,7 @@ class MinimalCourseSerializer(TimestampModelSerializer):
class Meta: class Meta:
model = Course model = Course
fields = ('key', 'uuid', 'title', 'course_runs', 'owners', 'image',) fields = ('key', 'uuid', 'title', 'course_runs', 'owners', 'image', 'short_description',)
class CourseSerializer(MinimalCourseSerializer): class CourseSerializer(MinimalCourseSerializer):
......
...@@ -109,6 +109,7 @@ class MinimalCourseSerializerTests(TestCase): ...@@ -109,6 +109,7 @@ class MinimalCourseSerializerTests(TestCase):
'course_runs': MinimalCourseRunSerializer(course.course_runs, many=True, context=context).data, 'course_runs': MinimalCourseRunSerializer(course.course_runs, many=True, context=context).data,
'owners': MinimalOrganizationSerializer(course.authoring_organizations, many=True, context=context).data, 'owners': MinimalOrganizationSerializer(course.authoring_organizations, many=True, context=context).data,
'image': ImageField().to_representation(course.card_image_url), 'image': ImageField().to_representation(course.card_image_url),
'short_description': course.short_description
} }
def test_data(self): def test_data(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment