Skip to content

Commit

Permalink
Fix an error: get_stripe_customer_id encountered an IndexError: list …
Browse files Browse the repository at this point in the history
…index out of range
  • Loading branch information
hiroshinishio committed Jan 21, 2025
1 parent 3150e6b commit ee3f18c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/supabase/owers_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ def get_stripe_customer_id(owner_id: int):
.eq(column="owner_id", value=owner_id)
.execute()
)
if not data or len(data) < 2 or not data[1]:
return None
customer_id: str | None = data[1][0]["stripe_customer_id"]
return customer_id

0 comments on commit ee3f18c

Please sign in to comment.