Fix error in stripe get_customer_id_for

This commit is contained in:
fnux 2020-03-05 11:28:20 +01:00
parent a41184d83d
commit d6ee806467

View file

@ -75,9 +75,7 @@ def get_customer_id_for(user):
try: try:
customer = create_customer(user.username, user.email) customer = create_customer(user.username, user.email)
uncloud_stripe_mapping = uncloud_pay.models.StripeCustomer.objects.create( uncloud_stripe_mapping = uncloud_pay.models.StripeCustomer.objects.create(
owner=user, owner=user, stripe_id=customer.id)
stripe_id=customer_request['response_object']['id']
)
return uncloud_stripe_mapping.stripe_id return uncloud_stripe_mapping.stripe_id
except Exception as e: except Exception as e:
return None return None