remove slot pk from form

This commit is contained in:
Luke Hatcher 2012-08-31 01:00:56 -04:00
parent d873283667
commit 224b9c8d57

View file

@ -9,16 +9,3 @@ class SlotEditForm(forms.Form):
queryset=Presentation.objects.filter(slot__isnull=True), queryset=Presentation.objects.filter(slot__isnull=True),
required=True, required=True,
) )
slot_pk = forms.CharField(
max_length=10,
widget=forms.HiddenInput,
required=False,
)
def clean_slot_pk(self):
value = self.cleaned_data["slot_pk"]
try:
Slot.objects.get(pk=value)
except Slot.DoesNotExist:
raise forms.ValidationError("Invalid slot.")
return value