Revision d36da5fa
Added by Benjamin Dauvergne over 12 years ago
calebasse/agenda/forms.py | ||
---|---|---|
42 | 42 |
self.fields['patient'].queryset = \ |
43 | 43 |
PatientRecord.objects.for_service(service) |
44 | 44 |
|
45 |
def clean_participants(self): |
|
46 |
if self.cleaned_data['participants'] and len(self.cleaned_data['participants']) > 1: |
|
47 |
raise forms.ValidationError(u'Un seul thérapeute est permis.') |
|
48 |
return self.cleaned_data['participants'] |
|
49 |
|
|
45 | 50 |
def clean_duration(self): |
46 | 51 |
duration = self.cleaned_data['duration'] |
47 | 52 |
try: |
Also available in: Unified diff
new appointment form: allow only one doctor as participant