From 0352096fa75dea71b524386fbe88b91db4338a89 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 29 Apr 2019 00:17:59 +0200 Subject: [PATCH] Call delete on Customer object --- datacenterlight/management/commands/deleteuser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datacenterlight/management/commands/deleteuser.py b/datacenterlight/management/commands/deleteuser.py index e508304b..4ba0c986 100644 --- a/datacenterlight/management/commands/deleteuser.py +++ b/datacenterlight/management/commands/deleteuser.py @@ -67,10 +67,10 @@ class Command(BaseCommand): "not exist".format(email)) sys.exit(1) stripe_customer = cus_user.stripecustomer - del_response = stripe.Customer.delete( + c = stripe.Customer.retrieve( stripe_customer.stripe_id ) - if del_response.deleted: + if c.delete(): logger.debug( "StripeCustomer {} associated with {} deleted" "".format(stripe_customer.stripe_id, email)