From 28a586e502f6b0ee032781f31842e7e02c444600 Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Wed, 3 Apr 2019 13:45:02 -0700 Subject: [PATCH] billing: Add default value for event_time in invoice_plans_as_needed. --- corporate/lib/stripe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py index 3418076a79597..c554052baebb7 100644 --- a/corporate/lib/stripe.py +++ b/corporate/lib/stripe.py @@ -443,7 +443,7 @@ def invoice_plan(plan: CustomerPlan, event_time: datetime) -> None: plan.next_invoice_date = next_invoice_date(plan) plan.save(update_fields=['next_invoice_date']) -def invoice_plans_as_needed(event_time: datetime) -> None: +def invoice_plans_as_needed(event_time: datetime=timezone_now()) -> None: for plan in CustomerPlan.objects.filter(next_invoice_date__lte=event_time): invoice_plan(plan, event_time)