We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c741be commit dfa1d7bCopy full SHA for dfa1d7b
backend/tenantfirstaid/shared.py
@@ -31,6 +31,13 @@ class Config:
31
db_username: Optional[str] = field(default=None)
32
db_password: Optional[str] = field(default=None)
33
34
+ def __post_init__(self):
35
+ """Post-initialization to ensure one of the API KEYs is not None."""
36
+ if self.github_api_key is None and self.openai_api_key is None:
37
+ raise ValueError(
38
+ "Either GITHUB_API_KEY or OPENAI_API_KEY must be set in the environment variables."
39
+ )
40
+
41
42
# For development purposes, we expect the .env file to be in the backend directory
43
__shared_py_path = Path(__file__).resolve()
0 commit comments