diff --git a/cms/envs/common.py b/cms/envs/common.py index 6db6dc13e2..38117b4e4a 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -2914,8 +2914,8 @@ SOCIAL_MEDIA_LOGO_URLS = { 'facebook': 'http://email-media.s3.amazonaws.com/edX/2021/social_1_fb.png', } -# .. setting_name: DEFAULT_ORG_LOGO_PATH -# .. setting_default: 'images/logo.png' -# .. setting_description: The default logo path for organizations that do not have a logo set. -# .. setting_warning: This path is used as a placeholder for organizations that do not have a logo set. -DEFAULT_ORG_LOGO_PATH = 'images/logo.png' +# .. setting_name: DEFAULT_ORG_LOGO_URL +# .. setting_default: Derived(lambda settings: settings.STATIC_URL + 'images/logo.png') +# .. setting_description: The default logo url for organizations that do not have a logo set. +# .. setting_warning: This url is used as a placeholder for organizations that do not have a logo set. +DEFAULT_ORG_LOGO_URL = Derived(lambda settings: settings.STATIC_URL + 'images/logo.png') diff --git a/openedx/core/lib/courses.py b/openedx/core/lib/courses.py index 969504eba5..98321abfef 100644 --- a/openedx/core/lib/courses.py +++ b/openedx/core/lib/courses.py @@ -41,10 +41,8 @@ def course_image_url(course, image_key='course_image'): def course_organization_image_url(course): """Return the course organization image URL or the default image URL.""" - default_logo_url = settings.STATIC_URL + settings.DEFAULT_ORG_LOGO_PATH - org = Organization.objects.filter(short_name=course.id.org).first() - return org.logo.url if org and org.logo else default_logo_url + return org.logo.url if org and org.logo else settings.DEFAULT_ORG_LOGO_URL def create_course_image_thumbnail(course, dimensions):