From 480e38fbc9b252856347302d91627d0bbea503e7 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 23 Dec 2020 14:19:52 +0530 Subject: [PATCH] Attempt fix for local variable 'card_details_dict' referenced before assignment --- datacenterlight/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 32650752..f373d9b0 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -1142,6 +1142,11 @@ def do_create_vm(request, user, stripe_api_cus_id, card_details_response, custom_user.stripecustomer.stripe_id, ucd.card_id ) + card_details_dict = { + 'last4': ucd.last4, + 'brand': ucd.brand, + 'card_id': ucd.card_id + } # Save billing address billing_address_data.update({