mirror of
https://github.com/pretix/pretix.git
synced 2026-05-14 16:44:06 +00:00
translate_property_mappings: old_id not in checkin_list_map
This commit is contained in:
@@ -520,7 +520,12 @@ def translate_property_mappings(property_mappings, checkin_list_map):
|
||||
for mapping in mappings:
|
||||
if mapping["pretix_field"].startswith("checkin_date_"):
|
||||
old_id = int(mapping["pretix_field"][len("checkin_date_"):])
|
||||
mapping["pretix_field"] = "checkin_date_%d" % checkin_list_map[old_id].pk
|
||||
if old_id not in checkin_list_map:
|
||||
# old_id might not be in checkin_list_map, because copying of an event series only copies check-in
|
||||
# lists covering the whole series, not individual dates.
|
||||
mapping["pretix_field"] = "_invalid_" + mapping["pretix_field"]
|
||||
else:
|
||||
mapping["pretix_field"] = "checkin_date_%d" % checkin_list_map[old_id].pk
|
||||
return json.dumps(mappings)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user