From d286a30022692200fe822a553937ae5ce5782a08 Mon Sep 17 00:00:00 2001 From: smathot Date: Fri, 26 Jul 2024 11:08:03 +0200 Subject: [PATCH] Fix database manager in webhook --- sigmund/__init__.py | 2 +- sigmund/routes/subscribe.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sigmund/__init__.py b/sigmund/__init__.py index 79f9345..8ce3cbd 100644 --- a/sigmund/__init__.py +++ b/sigmund/__init__.py @@ -1,3 +1,3 @@ """AI-based chatbot that provides sensible answers based on documentation""" -__version__ = '0.24.1' +__version__ = '0.24.2' diff --git a/sigmund/routes/subscribe.py b/sigmund/routes/subscribe.py index bf8b91d..0756d2d 100644 --- a/sigmund/routes/subscribe.py +++ b/sigmund/routes/subscribe.py @@ -144,7 +144,7 @@ def webhook(): # for subscription renewals, which are handled below. if event_type == 'checkout.session.completed': sigmund_user_id = event_object['client_reference_id'] - database = DatabaseManager(sigmund_user_id) + database = DatabaseManager(None, sigmund_user_id) database.update_subscription( stripe_customer_id=stripe_customer_id, stripe_subscription_id=stripe_subscription_id)