Do not create session cookie on first page view

This commit is contained in:
Raphael Michel
2020-12-07 22:29:05 +01:00
parent 089938c3ee
commit b51bd2118e

View File

@@ -24,6 +24,10 @@ def cached_invoice_address(request):
from .cart import cart_session
if not hasattr(request, '_checkout_flow_invoice_address'):
if not request.session.session_key:
# do not create a session, if we don't have a session we also don't have an invoice address ;)
request._checkout_flow_invoice_address = InvoiceAddress()
return request._checkout_flow_invoice_address
cs = cart_session(request)
iapk = cs.get('invoice_address')
if not iapk: