From 492048b07708799d6caef426bff7da7f0d756586 Mon Sep 17 00:00:00 2001 From: Kyrylo Kholodenko Date: Fri, 3 Jan 2025 11:47:34 +0200 Subject: [PATCH] fix: [AXM-1299] always display course title for vc course cards --- credentials/apps/verifiable_credentials/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/credentials/apps/verifiable_credentials/utils.py b/credentials/apps/verifiable_credentials/utils.py index 55add7f66..7f3d99986 100644 --- a/credentials/apps/verifiable_credentials/utils.py +++ b/credentials/apps/verifiable_credentials/utils.py @@ -7,6 +7,7 @@ from credentials.apps.credentials.api import get_user_credentials_by_content_type from credentials.apps.credentials.data import UserCredentialStatus +from credentials.apps.catalog.models import CourseRun def get_user_credentials_data(username, model): @@ -39,8 +40,9 @@ def get_user_credentials_data(username, model): credential.credential.program.authoring_organizations.values_list("name", flat=True) ) elif model == "coursecertificate": + course_run = CourseRun.objects.filter(key=credential.credential.course_id).first() credential_uuid = credential.credential.course_id - credential_title = credential.credential.title + credential_title = course_run.course.title credential_org = credential.credential.course_key.org data.append({