Skip to content

Commit

Permalink
Fix #1408 don't announce shops not connected to stripe connect
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsimpson committed Sep 15, 2024
1 parent 49aa889 commit 7a6d9f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions subscribie/blueprints/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from subscribie.utils import (
get_stripe_secret_key,
get_stripe_connect_account,
stripe_connect_active,
create_stripe_connect_account,
get_stripe_connect_account_id,
modify_stripe_account_capability,
Expand All @@ -28,7 +29,6 @@
get_stripe_invoices,
stripe_livemode,
announce_stripe_connect_account,
stripe_testmode,
currencyFormat,
get_shop_default_country_code,
dec2pence,
Expand Down Expand Up @@ -1925,8 +1925,8 @@ def announce_shop_stripe_connect_ids():
status = 200
msg = None

if stripe_testmode() is False and stripe_livemode() is False:
return jsonify("Stripe is not setup yet.")
if stripe_connect_active() is False:
return jsonify("Stripe connect is not setup yet.")

try:
stripe_connect_account_id = get_stripe_connect_account_id()
Expand Down
1 change: 1 addition & 0 deletions subscribie/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def check_if_inside_iframe():
@bp.app_context_processor
def inject_template_globals():
from subscribie.settings import settings as internal_settings

company = Company.query.first()
integration = Integration.query.first()
plans = Plan.query.filter_by(archived=0)
Expand Down

0 comments on commit 7a6d9f4

Please sign in to comment.