mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Fix rare crash in cart ID creation (PRETIXEU-78E)
This commit is contained in:
@@ -353,7 +353,8 @@ def get_or_create_cart_id(request, create=True):
|
|||||||
if cart_invalidated:
|
if cart_invalidated:
|
||||||
# This cart was created with a login but the person is now logged out.
|
# This cart was created with a login but the person is now logged out.
|
||||||
# Destroy the cart for privacy protection.
|
# Destroy the cart for privacy protection.
|
||||||
request.session['carts'][current_id] = {}
|
if 'carts' in request.session:
|
||||||
|
request.session['carts'][current_id] = {}
|
||||||
else:
|
else:
|
||||||
return current_id
|
return current_id
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user