0

I keep getting Attribute Error

'NoneType' object has no attribute 'get'

It points to: order_number = response.get('order_number',0)

Here are the related files in my checkout app.

0

2 Answers 2

2

Your function def process(request) returns nothing. So response is always None. It should return a response.

Sign up to request clarification or add additional context in comments.

Comments

1

change your process function to this

def process(request):
    order = create_order(request)
    results = {'order_number':order.id,'message':''}
    postdata = request.POST.copy()
    amount = cart.cart_subtotal(request)
    return results

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.