From a4567c4e42c29320c865f824e058731b3647eb8a Mon Sep 17 00:00:00 2001 From: Steve Androulakis Date: Mon, 26 May 2025 14:11:49 -0700 Subject: [PATCH] cover empty stripe api env --- tools/create_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/create_invoice.py b/tools/create_invoice.py index 11f51fd..3084845 100644 --- a/tools/create_invoice.py +++ b/tools/create_invoice.py @@ -27,7 +27,7 @@ def ensure_customer_exists( def create_invoice(args: dict) -> dict: """Create and finalize a Stripe invoice.""" # If an API key exists in the env file, find or create customer - if stripe.api_key is not None: + if stripe.api_key is not None and stripe.api_key != "": customer_id = ensure_customer_exists( args.get("customer_id"), args.get("email", "default@example.com") )