mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Fix crash during copying of check-in rules
This commit is contained in:
@@ -697,9 +697,9 @@ class Event(EventMixin, LoggedModel):
|
|||||||
for k, v in rules.items():
|
for k, v in rules.items():
|
||||||
if k == 'lookup':
|
if k == 'lookup':
|
||||||
if v[0] == 'product':
|
if v[0] == 'product':
|
||||||
v[1] = str(item_map.get(int(v[1]), 0).pk)
|
v[1] = str(item_map.get(int(v[1]), 0).pk) if int(v[1]) in item_map else "0"
|
||||||
elif v[0] == 'variation':
|
elif v[0] == 'variation':
|
||||||
v[1] = str(variation_map.get(int(v[1]), 0).pk)
|
v[1] = str(variation_map.get(int(v[1]), 0).pk) if int(v[1]) in variation_map else "0"
|
||||||
else:
|
else:
|
||||||
_walk_rules(v)
|
_walk_rules(v)
|
||||||
elif isinstance(rules, list):
|
elif isinstance(rules, list):
|
||||||
|
|||||||
Reference in New Issue
Block a user