forked from CGM_Public/pretix_original
Fix key error on copy_from (PRETIXEU-9NR) (#3868)
This commit is contained in:
@@ -245,7 +245,7 @@ class QuotaForm(I18nModelForm):
|
||||
'event': self.event.slug,
|
||||
'organizer': self.event.organizer.slug,
|
||||
}),
|
||||
'data-placeholder': _('All products')
|
||||
'data-placeholder': _('No products')
|
||||
},
|
||||
choices=choices,
|
||||
)
|
||||
|
||||
@@ -281,7 +281,7 @@ class SubEventEditorMixin(MetaDataEditorMixin):
|
||||
'name': q.name,
|
||||
'release_after_exit': q.release_after_exit,
|
||||
'ignore_for_event_availability': q.ignore_for_event_availability,
|
||||
'itemvars': [str(i.pk) for i in q.items.all()] + [
|
||||
'itemvars': [str(i.pk) for i in q.items.all() if (len(i.variations.all()) == 0)] + [
|
||||
'{}-{}'.format(v.item_id, v.pk) for v in q.variations.all()
|
||||
]
|
||||
} for q in self.copy_from.quotas.prefetch_related('items', 'variations')
|
||||
|
||||
Reference in New Issue
Block a user