1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-18 20:59:41 +02:00

fix: load from env if available vs file (#5635)

This commit is contained in:
Hayden 2025-07-04 19:08:50 -05:00 committed by GitHub
parent 9cce0f65aa
commit 0c534ad9d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,4 @@
import os
import pathlib
from dataclasses import dataclass
from pathlib import Path
@ -13,7 +14,7 @@ from mealie.schema._mealie import MealieModel
BASE = pathlib.Path(__file__).parent.parent.parent
API_KEY = dotenv.get_key(BASE / ".env", "CROWDIN_API_KEY")
API_KEY = dotenv.get_key(BASE / ".env", "CROWDIN_API_KEY") or os.environ.get("CROWDIN_API_KEY", "")
@dataclass