summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei MIHAI <smihai@entrouvert.com>2014-09-26 13:19:57 (GMT)
committerSerghei MIHAI <smihai@entrouvert.com>2014-09-26 13:19:57 (GMT)
commitc7a7ddf674a6259c85766fad863adb140bd50df3 (patch)
treeb6841f3a395edae5b52e83888fe5494d02bd8481
parenta943486280c3475f3c886a8f109c0aa1c62f1f96 (diff)
downloadcalebasse-c7a7ddf674a6259c85766fad863adb140bd50df3.zip
calebasse-c7a7ddf674a6259c85766fad863adb140bd50df3.tar.gz
calebasse-c7a7ddf674a6259c85766fad863adb140bd50df3.tar.bz2
agenda: availabilities in schedules are service agnostic
Closes #5587
-rw-r--r--calebasse/agenda/appointments.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/calebasse/agenda/appointments.py b/calebasse/agenda/appointments.py
index 9dd5cff..3c0605a 100644
--- a/calebasse/agenda/appointments.py
+++ b/calebasse/agenda/appointments.py
@@ -144,7 +144,7 @@ def get_daily_appointments(date, worker, service, time_tables, events, holidays)
service_time_tables = [tt for tt in time_tables if service in tt.services.all()]
timetables_set = IntervalSet((t.to_interval(date) for t in service_time_tables))
holidays_set = IntervalSet((h.to_interval(date) for h in holidays))
- busy_occurrences_set = IntervalSet((o.to_interval() for o in events if not o.is_event_absence() and service in o.services.all()))
+ busy_occurrences_set = IntervalSet((o.to_interval() for o in events if not o.is_event_absence()))
for free_time in timetables_set - (busy_occurrences_set+holidays_set):
if free_time:
delta = free_time.upper_bound - free_time.lower_bound