Skip to content

Commit

Permalink
#1386 black format
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsimpson committed Aug 11, 2024
1 parent 5fe920a commit c6c3a37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion subscribie/blueprints/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
backfill_transactions,
backfill_subscriptions,
backfill_persons,
backfill_stripe_invoices
backfill_stripe_invoices,
)
from subscribie.forms import (
TawkConnectForm,
Expand Down
13 changes: 8 additions & 5 deletions subscribie/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,9 @@ def backfill_persons(days=30):
)
for stripe_session in stripe_checkout_sessions.auto_paging_iter():
if stripe_session.metadata.get("subscribie_checkout_session_id") is None:
log.warning(f"No subscribie_checkout_session_id found on metadata for stripe_session {stripe_session.id}") # noqa: E501
log.warning(
f"No subscribie_checkout_session_id found on metadata for stripe_session {stripe_session.id}"
) # noqa: E501
continue

subscribie_subscription = (
Expand All @@ -770,7 +772,9 @@ def backfill_persons(days=30):
)
if subscribie_subscription is not None:
if subscribie_subscription.person is None:
log.warning(f"Skipping stripe_session {stripe_session.id} as person is None for subscription {subscribie_subscription.id}") # noqa: E501
log.warning(
f"Skipping stripe_session {stripe_session.id} as person is None for subscription {subscribie_subscription.id}"
) # noqa: E501
continue
# Update the subscribie_subscription in Subscription model
log.debug(f"At stripe_session.id: {stripe_session.id}")
Expand Down Expand Up @@ -799,6 +803,7 @@ def backfill_stripe_invoices(days=30):
"""
from subscribie.models import StripeInvoice

stripe_connect_account_id = get_stripe_connect_account_id()

stripe.api_key = get_stripe_secret_key()
Expand All @@ -815,9 +820,7 @@ def backfill_stripe_invoices(days=30):

local_stripe_invoice = (
database.session.query(StripeInvoice)
.filter_by(
id=stripe_invoice.id
)
.filter_by(id=stripe_invoice.id)
.first()
)
if local_stripe_invoice is not None:
Expand Down

0 comments on commit c6c3a37

Please sign in to comment.