Project

General

Profile

« Previous | Next » 

Revision 6aa3310c

Added by Serghei Mihai over 9 years ago

agenda: handling cases when service time tables are not queryset

View differences:

calebasse/agenda/appointments.py
141 141
    appointments = []
142 142
    activity = {'absences': []}
143 143

  
144
    service_time_tables = time_tables.filter(services=service)
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 147
    busy_occurrences_set = IntervalSet((o.to_interval() for o in events if not o.is_event_absence() and service in o.services.all()))

Also available in: Unified diff