mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Return early if themes dir does not exist (#3453)
* Return early if themes dir does not exist (cherry picked from commit 3e1cdcdb079fd2614d4a6478dc0addea94537d6f) * Bump version number to 0.8.1
This commit is contained in:
parent
6118d1319c
commit
63664714ca
@ -13,7 +13,7 @@ import common.models
|
||||
from InvenTree.api_version import INVENTREE_API_VERSION
|
||||
|
||||
# InvenTree software version
|
||||
INVENTREE_SW_VERSION = "0.8.0"
|
||||
INVENTREE_SW_VERSION = "0.8.1"
|
||||
|
||||
|
||||
def inventreeInstanceName():
|
||||
|
@ -1775,12 +1775,13 @@ 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):
|
||||
if 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 = []
|
||||
|
||||
for file in os.listdir(settings.STATIC_COLOR_THEMES_DIR):
|
||||
files_list.append(os.path.splitext(file))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user