From 5273573912e599fda49e958eabeb0ac97302ade3 Mon Sep 17 00:00:00 2001 From: muhammad-ammar Date: Wed, 5 Jul 2023 11:10:07 +0500 Subject: [PATCH] fix: pick first object from CourseDetails --- CHANGELOG.rst | 4 ++++ enterprise/__init__.py | 2 +- enterprise_learner_portal/api/v1/serializers.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f32675c71d..1de30ba9a4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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` diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 07480c5a95..ad74471075 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,6 +2,6 @@ Your project description goes here. """ -__version__ = "3.68.0" +__version__ = "3.68.1" default_app_config = "enterprise.apps.EnterpriseConfig" diff --git a/enterprise_learner_portal/api/v1/serializers.py b/enterprise_learner_portal/api/v1/serializers.py index 0b5d39139a..ac4f18a57e 100644 --- a/enterprise_learner_portal/api/v1/serializers.py +++ b/enterprise_learner_portal/api/v1/serializers.py @@ -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