Skip to content

Commit

Permalink
Update hushline/model.py
Browse files Browse the repository at this point in the history
Co-authored-by: Jeremy Moore <jeremymoore@gmail.com>
  • Loading branch information
micahflee and jeremywmoore committed Sep 27, 2024
1 parent d6ca371 commit 6e49ad0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hushline/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def __init__(self, invoice: Invoice):
self.created_at = datetime.fromtimestamp(invoice.created, tz=timezone.utc)

# Look up the user by their customer ID
user = db.session.query(User).filter_by(stripe_customer_id=invoice.customer).first()
user = db.session.scalars(db.select(User).filter_by(stripe_customer_id=invoice.customer)).one_or_none()
if user:
self.user_id = user.id
else:
Expand Down

0 comments on commit 6e49ad0

Please sign in to comment.