Project

General

Profile

« Previous | Next » 

Revision 477e1b65

Added by Frédéric Péters over 12 years ago

agenda: fix service activity columns (#2085)

View differences:

calebasse/agenda/managers.py
90 90
            date: may be either a datetime.datetime, datetime.date object, or
91 91
            ``None``. If ``None``, default to the current day.
92 92
            participants: a list of CalebasseUser
93
            services: a list of services
94
            event_type: a single, or a list of, event types
93 95
        '''
94 96
        date = date or datetime.now()
95 97
        start = datetime(date.year, date.month, date.day)
......
114 116
        if services:
115 117
            qs = qs.filter(event__services__in=services)
116 118
        if event_type:
117
            qs = qs.filter(event__event_type=event_type)
119
            if type(event_type) is list:
120
                qs = qs.filter(event__event_type__in=event_type)
121
            else:
122
                qs = qs.filter(event__event_type=event_type)
118 123
        return qs
119 124

  
120 125
    def daily_disponiblity(self, date, occurrences, participants, time_tables):

Also available in: Unified diff