From 2a14741bbe58c283776799c39d0f946c8c6d586a Mon Sep 17 00:00:00 2001 From: "Kyle D. McCormick" Date: Mon, 6 May 2024 15:26:07 -0400 Subject: [PATCH] fix: fall back to settings.COMPREHENSIVE_THEME_DIRS correctly There was a logical error in the compile_sass management command: instead of falling back to settings.COMPREHENSIVE_THEME_DIRS when --theme-dirs was *None or missing*, we only fell back to it when --theme-dirs was *missing*. This caused theme compilation to be skipped when COMREHENSIVE_THEME_DIRS *is not set* in the environment, even though settings.COMPREHENSIVE_THEME_DIRS *is set* in Django settings, which is currently the case for edx.org. --- .../djangoapps/theming/management/commands/compile_sass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/theming/management/commands/compile_sass.py b/openedx/core/djangoapps/theming/management/commands/compile_sass.py index eecbe684b528..fbfdd2f222a4 100644 --- a/openedx/core/djangoapps/theming/management/commands/compile_sass.py +++ b/openedx/core/djangoapps/theming/management/commands/compile_sass.py @@ -73,8 +73,8 @@ def handle(self, *args, **options): {"lms": "lms", "cms": "cms", "studio": "cms"}[sys] for sys in options.get("system", ["lms", "cms"]) ) - theme_dirs = options.get("theme_dirs", settings.COMPREHENSIVE_THEME_DIRS) or [] - themes_option = options.get("themes", []) # '[]' means 'all' + theme_dirs = options.get("theme_dirs") or settings.COMPREHENSIVE_THEME_DIRS or [] + themes_option = options.get("themes") or [] # '[]' means 'all' if not settings.ENABLE_COMPREHENSIVE_THEMING: compile_themes = False themes = []