Fix getting card_id and compare

This commit is contained in:
PCoder 2020-12-23 13:56:08 +05:30
parent a4a5acd0e7
commit 981e68aa4f

View file

@ -1117,8 +1117,8 @@ def do_create_vm(request, user, stripe_api_cus_id, card_details_response,
user_hosting_key.save()
logger.debug("User %s key is saved" % custom_user.email)
if 'card_id' in request:
card_id = request.get('card_id')
card_id = request.get('card_id', None)
if card_id:
logger.debug("card_id %s was in request" % card_id)
user_card_detail = UserCardDetail.objects.get(id=card_id)
card_details_dict = {