From 328b01e2a503eb6254e616b693cf1c2e84c691f8 Mon Sep 17 00:00:00 2001 From: hay-kot Date: Thu, 1 Apr 2021 19:44:50 -0800 Subject: [PATCH] fix settings --- mealie/core/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mealie/core/config.py b/mealie/core/config.py index 260768a1b..0532cf869 100644 --- a/mealie/core/config.py +++ b/mealie/core/config.py @@ -12,7 +12,7 @@ CWD = Path(__file__).parent BASE_DIR = CWD.parent.parent ENV = BASE_DIR.joinpath(".env") -PRODUCTION = os.environ.get("ENV") +PRODUCTION = os.getenv("ENV", 'False').lower() in ['true', '1'] def determine_data_dir(production: bool) -> Path: @@ -111,7 +111,7 @@ class AppSettings(BaseSettings): SQLITE_FILE: Optional[Union[str, Path]] @validator("SQLITE_FILE", pre=True) - def identify_sqlite_file(_cls, v: str) -> Optional[str]: + def identify_sqlite_file(cls, v: str) -> Optional[str]: return app_dirs.SQLITE_DIR.joinpath(f"mealie_{DB_VERSION}.sqlite") DEFAULT_GROUP: str = "Home"