Traceback (most recent call last): File "/srv/app/api/views.py", line 96, in create_order total = compute_total(cart, customer.discount_rate) File "/srv/app/api/pricing.py", line 38, in compute_total return subtotal * (1 - rate) ~~~~~~~~^~~~~~ TypeError: unsupported operand type(s) for -: 'int' and 'NoneType' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/srv/app/api/views.py", line 101, in create_order log.error("pricing failed for %s", customer.id) AttributeError: 'NoneType' object has no attribute 'id'