From bd10dc34030c8d4110009037ed928c78f895154f Mon Sep 17 00:00:00 2001 From: Sebastian Prada <124845893+Ever3tt@users.noreply.github.com> Date: Wed, 3 Jan 2024 10:30:12 -0500 Subject: [PATCH] fix: improved handling of empty directories in get_dirs method (#51) --- eox_theming/theming/template_loaders.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eox_theming/theming/template_loaders.py b/eox_theming/theming/template_loaders.py index 54e7361..6095b1c 100644 --- a/eox_theming/theming/template_loaders.py +++ b/eox_theming/theming/template_loaders.py @@ -93,4 +93,6 @@ def get_dirs(self): https://github.com/eduNEXT/edunext-platform/blob/master/openedx/core/djangoapps/theming/template_loaders.py#L39 instead of using the cached values of self.dirs on runtime. """ - return ThemeFilesystemLoader.get_theme_template_sources() + theme_dirs = ThemeFilesystemLoader.get_theme_template_sources() + + return theme_dirs if theme_dirs else super().get_dirs()