diff --git a/nodes/secure_api_call.py b/nodes/secure_api_call.py index e1ad18c..898cf4b 100644 --- a/nodes/secure_api_call.py +++ b/nodes/secure_api_call.py @@ -68,13 +68,17 @@ class SecureApiCall: if not env_name.replace("_", "").isalnum(): raise ValueError("Environment variable names must only contain letters, numbers, and underscores") env_var = f"COMFYUI_SECUREAPICALL_{env_name}" - api_url = os.getenv(env_var) or raise ValueError(f"Environment Variable {env_var} is not set") + api_url = os.getenv(env_var) + if not api_url: + raise ValueError(f"Environment Variable {env_var} is not set") if api_auth.startswith("$ENV."): env_name = api_auth.removeprefix("$ENV.") if not env_name.replace("_", "").isalnum(): raise ValueError("Environment variable names must only contain letters, numbers, and underscores") env_var = f"COMFYUI_SECUREAPICALL_{env_name}" - api_auth = os.getenv(env_var) or raise ValueError(f"Environment Variable {env_var} is not set") + api_auth = os.getenv(env_var) + if not api_auth: + raise ValueError(f"Environment Variable {env_var} is not set") # Send the payload to the API res = requests.post(