refactor: change placeholder variable_name + url and add placeholder image
This commit is contained in:
@@ -41,7 +41,7 @@ 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.MEDIA_URL + settings.DEFAULT_ORG_LOGO_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
|
||||
|
||||
Reference in New Issue
Block a user