From 2c3146111f5113116bf4dfa52772cbf26924b448 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 3 Apr 2019 09:20:38 +0200 Subject: [PATCH] Fix getting subscription id --- utils/stripe_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/stripe_utils.py b/utils/stripe_utils.py index ec430485..b43470fa 100644 --- a/utils/stripe_utils.py +++ b/utils/stripe_utils.py @@ -157,7 +157,7 @@ class StripeUtils(object): [line.metadata.VM_ID if hasattr(line.metadata, 'VM_ID') else '' for line in invoice.lines.data] ), 'subscription_ids_csv': ','.join( - [line.subscription if hasattr(line, 'subscription') else '' for line in invoice.lines.data] + [line.id if line.type == 'subscription' else '' for line in invoice.lines.data] ), } starting_after = invoice.id