forked from CGM_Public/pretix_original
Item update: restrict choices
This commit is contained in:
@@ -42,6 +42,11 @@ class PropertyList(ListView):
|
||||
|
||||
class ItemUpdateFormGeneral(forms.ModelForm):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['category'].queryset = self.instance.event.categories.all()
|
||||
self.fields['properties'].queryset = self.instance.event.properties.all()
|
||||
|
||||
class Meta:
|
||||
model = Item
|
||||
localized_fields = '__all__'
|
||||
|
||||
Reference in New Issue
Block a user