remove slot pk from form
This commit is contained in:
parent
d873283667
commit
224b9c8d57
1 changed files with 0 additions and 13 deletions
|
@ -9,16 +9,3 @@ class SlotEditForm(forms.Form):
|
|||
queryset=Presentation.objects.filter(slot__isnull=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
|
||||
|
|
Loading…
Reference in a new issue