Skip to content

Commit

Permalink
fix: fall back to settings.COMPREHENSIVE_THEME_DIRS correctly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kdmccormick committed May 6, 2024
1 parent 56c69ea commit 2a14741
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit 2a14741

Please sign in to comment.