From bc6ff28ff5b1d1632f2dd2ca64743c4012ccc396 Mon Sep 17 00:00:00 2001 From: Ayush Sehrawat <69469790+AyushSehrawat@users.noreply.github.com> Date: Sat, 19 Oct 2024 14:35:40 +0000 Subject: [PATCH] fix: add default value for API_KEY --- src/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/__init__.py b/src/utils/__init__.py index f5faed3f..1159014f 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -24,7 +24,7 @@ def get_version() -> str: def generate_api_key(): """Generate a secure API key of the specified length.""" - API_KEY = os.getenv("API_KEY") + API_KEY = os.getenv("API_KEY", "") if len(API_KEY) != 32: logger.warning("env.API_KEY is not 32 characters long, generating a new one...") characters = string.ascii_letters + string.digits