mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Fixed wrong ModelChoiceField queryset in voucher form
This commit is contained in:
@@ -10,5 +10,9 @@ class VoucherForm(I18nModelForm):
|
|||||||
'code', 'valid_until', 'block_quota', 'allow_ignore_quota', 'price', 'item'
|
'code', 'valid_until', 'block_quota', 'allow_ignore_quota', 'price', 'item'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
self.fields['item'].queryset = self.instance.event.items.all()
|
||||||
|
|
||||||
def _get_validation_exclusions(self):
|
def _get_validation_exclusions(self):
|
||||||
return []
|
return []
|
||||||
|
|||||||
Reference in New Issue
Block a user