1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-21 18:03:54 +03:00

a little optimization

This commit is contained in:
Adolfo Gómez García 2017-12-12 19:42:09 +01:00
parent 9519c7c95b
commit 81dd4e3b8c

View File

@ -117,8 +117,8 @@ class CalendarChecker(object):
next_event = None
for rule in self.calendar.rules.all():
# logger.debug('RULE: start = {}, checkFrom = {}, end'.format(rule.start.date(), checkFrom.date()))
# if rule.end is not None and rule.end < checkFrom.date():
# continue
if rule.end is not None and rule.end < checkFrom.date():
continue
# logger.debug('Rule in check interval...')
if startEvent:
event = rule.as_rrule().after(checkFrom) # At start