personnes: group holidays filtering updated

Closes #4141
This commit is contained in:
Serghei Mihai 2013-12-18 11:56:54 +01:00
parent 4976c5c2e6
commit 8379904eca
No known key found for this signature in database
GPG Key ID: 76D1C964BF2FA1AF
1 changed files with 1 additions and 2 deletions

View File

@ -332,11 +332,10 @@ group_holiday_update = GroupHolidayUpdateView.as_view()
class GroupHolidaysList(cbv.ListView):
model = models.Holiday
template_name = 'personnes/group_holidays_list.html'
queryset = model.objects.future()
queryset = model.objects.future().filter(worker__isnull=True)
def get_queryset(self, *args, **kwargs):
qs = super(GroupHolidaysList, self).get_queryset(*args, **kwargs)
qs = qs.filter(worker__isnull=True)
return qs
group_holidays = GroupHolidaysList.as_view()