Project

General

Profile

« Previous | Next » 

Revision b16fae0e

Added by Benjamin Dauvergne over 12 years ago

agenda: fix bugs in exceptions handling

View differences:

calebasse/agenda/models.py
233 233
            return None
234 234
        if match:
235 235
            exception = self.get_exceptions_dict().get(today)
236
            if exception and exception.start_datetime.date() == today():
237
                return exception.today_occurrence(today)
238
            else:
239
                return None
236
            if exception:
237
                if exception.start_datetime.date() == today:
238
                    return exception.today_occurrence(today)
239
                else:
240
                    return None
240 241
        else:
241 242
            exception_or_self = self.match_date(today)
242 243
            if exception_or_self is None:
......
284 285
        if not hasattr(self, 'exceptions_dict'):
285 286
            self.exceptions_dict = dict()
286 287
            if self.exception_to_id is None:
287
                for exception in self.exceptions.all():
288
                for exception in self.exceptions.select_subclasses():
288 289
                    self.exceptions_dict[exception.exception_date] = exception
289 290
        return self.exceptions_dict
290 291

  

Also available in: Unified diff