Project

General

Profile

« Previous | Next » 

Revision a73d8a82

Added by Serghei Mihai over 10 years ago

personnes: individual holidays creation fix

Closes #3108

View differences:

calebasse/personnes/views.py
414 414

  
415 415
    def form_valid(self, form):
416 416
        try:
417
            form.save()
417
            holiday = form.save()
418
            worker = models.Worker.objects.get(pk=self.kwargs['worker_pk'])
419
            holiday.worker = worker
420
            holiday.save()
418 421
            messages.success(self.request, u'Absence ajoutée avec succès')
419 422
        except Exception, e:
420 423
            logger.debug('Error on creating a holiday: %s' % e)

Also available in: Unified diff