Revision c7a7ddf6
Added by Serghei Mihai over 10 years ago
calebasse/agenda/appointments.py | ||
---|---|---|
144 | 144 |
service_time_tables = [tt for tt in time_tables if service in tt.services.all()] |
145 | 145 |
timetables_set = IntervalSet((t.to_interval(date) for t in service_time_tables)) |
146 | 146 |
holidays_set = IntervalSet((h.to_interval(date) for h in holidays)) |
147 |
busy_occurrences_set = IntervalSet((o.to_interval() for o in events if not o.is_event_absence() and service in o.services.all()))
|
|
147 |
busy_occurrences_set = IntervalSet((o.to_interval() for o in events if not o.is_event_absence())) |
|
148 | 148 |
for free_time in timetables_set - (busy_occurrences_set+holidays_set): |
149 | 149 |
if free_time: |
150 | 150 |
delta = free_time.upper_bound - free_time.lower_bound |
Also available in: Unified diff
agenda: availabilities in schedules are service agnostic
Closes #5587