Skip to content

Commit f5e4ddf

Browse files
committed
fix: safely fetch subs plan uuid when populating summary
1 parent afca6cd commit f5e4ddf

File tree

1 file changed

+9
-2
lines changed
  • enterprise_access/apps/customer_billing

1 file changed

+9
-2
lines changed

enterprise_access/apps/customer_billing/models.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,15 @@ def populate_with_summary_data(self):
924924
workflow_record_uuid=checkout_intent.workflow.uuid,
925925
).first()
926926

927-
if subscription_step and subscription_step.output_object:
928-
self.subscription_plan_uuid = subscription_step.output_object.uuid
927+
try:
928+
if subscription_step and subscription_step.output_object:
929+
self.subscription_plan_uuid = subscription_step.output_object.uuid
930+
except Exception as exc: # pylint: disable=broad-exception-caught
931+
logger.warning(
932+
'Could not get trial subscription output data for %s, CheckoutIntent %s',
933+
self.event_id,
934+
checkout_intent.uuid,
935+
)
929936

930937
# Extract data from the Stripe event payload
931938
event_data = stripe_event_data.data

0 commit comments

Comments
 (0)