Revision 08516aa9
Added by Benjamin Dauvergne over 12 years ago
calebasse/personnes/forms.py | ||
---|---|---|
211 | 211 |
|
212 | 212 |
def save(self, commit=True): |
213 | 213 |
instance = super(GroupHolidayForm, self).save(commit=False) |
214 |
if not self.cleaned_data.get('for_all_services', False): |
|
214 |
if self.cleaned_data.get('for_all_services', False): |
|
215 |
instance.service = None |
|
216 |
else: |
|
215 | 217 |
instance.service = self.service |
216 | 218 |
if commit: |
217 | 219 |
instance.save() |
Also available in: Unified diff
personnes: set service to None if holiday is for all services