mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Force widget data to be a dictionary
This commit is contained in:
@@ -369,6 +369,8 @@ class CartAdd(EventViewMixin, CartActionMixin, AsyncAction, View):
|
|||||||
if "widget_data" in request.POST:
|
if "widget_data" in request.POST:
|
||||||
try:
|
try:
|
||||||
widget_data = json.loads(request.POST.get("widget_data", "{}"))
|
widget_data = json.loads(request.POST.get("widget_data", "{}"))
|
||||||
|
if not isinstance(widget_data, dict):
|
||||||
|
widget_data = {}
|
||||||
except ValueError:
|
except ValueError:
|
||||||
widget_data = {}
|
widget_data = {}
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user