2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 20:20:58 +00:00

skip css if not available

This commit is contained in:
Matthias
2022-05-20 00:10:41 +02:00
parent eac6456949
commit b87f44dbfc
2 changed files with 13 additions and 0 deletions

View File

@ -1694,6 +1694,9 @@ class ColorTheme(models.Model):
@classmethod
def get_color_themes_choices(cls):
""" Get all color themes from static folder """
if settings.TESTING and not os.path.exists(settings.STATIC_COLOR_THEMES_DIR):
logger.error('Theme directory does not exsist')
return []
# Get files list from css/color-themes/ folder
files_list = []