Project

General

Profile

« Previous | Next » 

Revision 8379904e

Added by Serghei Mihai over 10 years ago

personnes: group holidays filtering updated

Closes #4141

View differences:

calebasse/personnes/views.py
332 332
class GroupHolidaysList(cbv.ListView):
333 333
    model = models.Holiday
334 334
    template_name = 'personnes/group_holidays_list.html'
335
    queryset = model.objects.future()
335
    queryset = model.objects.future().filter(worker__isnull=True)
336 336

  
337 337
    def get_queryset(self, *args, **kwargs):
338 338
        qs = super(GroupHolidaysList, self).get_queryset(*args, **kwargs)
339
        qs = qs.filter(worker__isnull=True)
340 339
        return qs
341 340

  
342 341
group_holidays = GroupHolidaysList.as_view()

Also available in: Unified diff