mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
fix settings
This commit is contained in:
parent
fd21777990
commit
328b01e2a5
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ CWD = Path(__file__).parent
|
||||||
BASE_DIR = CWD.parent.parent
|
BASE_DIR = CWD.parent.parent
|
||||||
|
|
||||||
ENV = BASE_DIR.joinpath(".env")
|
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:
|
def determine_data_dir(production: bool) -> Path:
|
||||||
|
@ -111,7 +111,7 @@ class AppSettings(BaseSettings):
|
||||||
SQLITE_FILE: Optional[Union[str, Path]]
|
SQLITE_FILE: Optional[Union[str, Path]]
|
||||||
|
|
||||||
@validator("SQLITE_FILE", pre=True)
|
@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")
|
return app_dirs.SQLITE_DIR.joinpath(f"mealie_{DB_VERSION}.sqlite")
|
||||||
|
|
||||||
DEFAULT_GROUP: str = "Home"
|
DEFAULT_GROUP: str = "Home"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue