From 883da0a1752504e9e4de6d6c25b7c75665dd1056 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Fri, 6 Dec 2024 11:32:36 +0000 Subject: [PATCH] fix: key errors --- codeforlife/settings/custom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codeforlife/settings/custom.py b/codeforlife/settings/custom.py index 05fbcf0..a1076ae 100644 --- a/codeforlife/settings/custom.py +++ b/codeforlife/settings/custom.py @@ -9,13 +9,13 @@ from ..types import Env # The name of the current environment. -ENV = t.cast(Env, os.environ["ENV"]) +ENV = t.cast(Env, os.getenv("ENV", "local")) # The base directory of the current service. -SERVICE_BASE_DIR = Path(os.environ["SERVICE_BASE_DIR"]) +SERVICE_BASE_DIR = Path(os.getenv("SERVICE_BASE_DIR", "/")) # The name of the current service. -SERVICE_NAME = os.environ["SERVICE_NAME"] +SERVICE_NAME = os.getenv("SERVICE_NAME", "REPLACE_ME") # If the current service the root service. This will only be true for portal. SERVICE_IS_ROOT = bool(int(os.getenv("SERVICE_IS_ROOT", "0")))