Revision d29317d3
Added by Serghei Mihai about 11 years ago
calebasse/personnes/views.py | ||
---|---|---|
260 | 260 |
.select_related('worker', 'service') |
261 | 261 |
holiday_by_worker = defaultdict(lambda: []) |
262 | 262 |
service = Service.objects.get(slug = ctx['service']) |
263 |
all_holidays = holidays.filter(worker__isnull=True, services=service) |
|
263 |
all_holidays = holidays.filter(Q(services=service) | Q(services__isnull = True), |
|
264 |
worker__isnull=True) |
|
264 | 265 |
|
265 | 266 |
for worker in workers: |
266 | 267 |
holiday_by_worker[worker] = list(all_holidays) |
Also available in: Unified diff
personnes: showing the services common holidays for each service
Closes #4105