agenda: check if duration is an integer in new appointment form

Closes #5086
This commit is contained in:
Serghei Mihai 2014-07-03 10:28:58 +02:00
parent 74d4a9e238
commit 7a2d7c8a9c
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class NewAppointmentForm(BaseForm):
try:
return int(duration)
except ValueError:
return 0
raise forms.ValidationError('Veuillez saisir un entier')
def clean_patient(self):
patients = self.cleaned_data['patient']