Project

General

Profile

« Previous | Next » 

Revision b4e25157

Added by Serghei Mihai over 10 years ago

personnes: group holidays displayed by service

Closes #4105

View differences:

calebasse/personnes/views.py
259 259
                        start_date__lte=filter_end_date) \
260 260
                .select_related('worker', 'service')
261 261
        holiday_by_worker = defaultdict(lambda: [])
262
        all_holidays = holidays.filter(worker__isnull=True)
262
        service = Service.objects.get(slug = ctx['service'])
263
        all_holidays = holidays.filter(worker__isnull=True, services=service)
263 264

  
264 265
        for worker in workers:
265 266
            holiday_by_worker[worker] = list(all_holidays)

Also available in: Unified diff