Skip to content

Commit

Permalink
billing: Add default value for event_time in invoice_plans_as_needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rishig committed Apr 5, 2019
1 parent 22a3b42 commit 28a586e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corporate/lib/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 28a586e

Please sign in to comment.