Skip to content

Commit

Permalink
Merge pull request #1789 from openedx/ammar/fix-coursedetails-object-…
Browse files Browse the repository at this point in the history
…access

fix: pick first object from CourseDetails
  • Loading branch information
jajjibhai008 authored Jul 5, 2023
2 parents 206b5fc + 5273573 commit 76a2634
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Change Log
Unreleased
----------
[3.68.1]
--------
fix: pick first object from CourseDetails

[3.68.0]
--------
feat: add more metadata into `EnterpriseCourseEnrollmentView`
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Your project description goes here.
"""

__version__ = "3.68.0"
__version__ = "3.68.1"

default_app_config = "enterprise.apps.EnterpriseConfig"
2 changes: 1 addition & 1 deletion enterprise_learner_portal/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def to_representation(self, instance):
representation['mode'] = instance.mode

if CourseDetails:
course_details = CourseDetails.objects.filter(id=course_run_id)
course_details = CourseDetails.objects.filter(id=course_run_id).first()
if course_details:
representation['course_type'] = course_details.course_type
representation['product_source'] = course_details.product_source
Expand Down

0 comments on commit 76a2634

Please sign in to comment.