Skip to content

Commit

Permalink
Fixed wrong ModelChoiceField queryset in voucher form
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Feb 19, 2016
1 parent ee57fe8 commit 682ca6d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pretix/control/forms/vouchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ class Meta:
'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):
return []

0 comments on commit 682ca6d

Please sign in to comment.