diff --git a/CHANGELOG.md b/CHANGELOG.md index bc07cab..2c012e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥". ## Unreleased +- [Bugfix] Fix "LazyStaticAbsoluteUrl is not JSON serializable" error when sending bulk emails. - [Bugfix] Fix `tutor local importdemocourse` fails when platform is not up. ## v13.1.0 (2022-01-08) diff --git a/tutor/templates/apps/openedx/settings/partials/common_lms.py b/tutor/templates/apps/openedx/settings/partials/common_lms.py index 577bd41..994cab8 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_lms.py +++ b/tutor/templates/apps/openedx/settings/partials/common_lms.py @@ -19,25 +19,7 @@ COURSE_ABOUT_VISIBILITY_PERMISSION = "see_about_page" OAUTH_ENFORCE_SECURE = False # Email settings -class LazyStaticAbsoluteUrl: - """ - Evaluates a static asset path lazily at runtime - """ - def __init__(self, path): - self.path = path - - def __str__(self): - from django.conf import settings - from django.contrib.staticfiles.storage import staticfiles_storage - return settings.LMS_ROOT_URL + staticfiles_storage.url(self.path) - - def to_json(self): - # This method is required for json serialization by edx-ace, notably for - # serialization of the registration email. See - # edx_ace.serialization.MessageEncoder. - return str(self) -# We need a lazily-computed logo url to capture the url of the theme-specific logo. -DEFAULT_EMAIL_LOGO_URL = LazyStaticAbsoluteUrl("images/logo.png") +DEFAULT_EMAIL_LOGO_URL = LMS_ROOT_URL + "/theming/asset/images/logo.png" # Create folders if necessary for folder in [DATA_DIR, LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE, ORA2_FILEUPLOAD_ROOT]: