Skip to content

Commit

Permalink
feat: serialize 'course_key' from the CourseDetails model (#2185)
Browse files Browse the repository at this point in the history
  • Loading branch information
brobro10000 authored Jul 30, 2024
1 parent e0b5d42 commit e91e17f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Unreleased
----------
* nothing unreleased

[4.22.2]
----------
* fix: Serializes `course_key` field from the federated-content-metadata, `CourseDetails` model within the `EnterpriseCourseEnrollmentSerializer`.

[4.22.1]
----------
* bump enterprise to 4.22.1.
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "4.22.1"
__version__ = "4.22.2"
1 change: 1 addition & 0 deletions enterprise_learner_portal/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def to_representation(self, instance):
if CourseDetails:
course_details = CourseDetails.objects.filter(id=course_run_id).first()
if course_details:
representation['course_key'] = course_details.course_key
representation['course_type'] = course_details.course_type
representation['product_source'] = course_details.product_source
representation['start_date'] = course_details.start_date or representation['start_date']
Expand Down

0 comments on commit e91e17f

Please sign in to comment.