mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Do not create session cookie on first page view
This commit is contained in:
@@ -24,6 +24,10 @@ def cached_invoice_address(request):
|
|||||||
from .cart import cart_session
|
from .cart import cart_session
|
||||||
|
|
||||||
if not hasattr(request, '_checkout_flow_invoice_address'):
|
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)
|
cs = cart_session(request)
|
||||||
iapk = cs.get('invoice_address')
|
iapk = cs.get('invoice_address')
|
||||||
if not iapk:
|
if not iapk:
|
||||||
|
|||||||
Reference in New Issue
Block a user