si un événement fini le matin tôt, il n'est pas indiqué dans le jour concerné
This commit is contained in:
parent
165c997838
commit
2b48a210ae
@ -64,7 +64,15 @@ class CalendarDay:
|
|||||||
def is_today(self):
|
def is_today(self):
|
||||||
return self.today
|
return self.today
|
||||||
|
|
||||||
|
def is_event_finishing_early_in_this_day(self, event):
|
||||||
|
if event.end_day is None or event.end_time is None:
|
||||||
|
return False
|
||||||
|
if event.start_day == event.end_day:
|
||||||
|
return False
|
||||||
|
return event.end_day == self.date and event.end_time < time(4)
|
||||||
|
|
||||||
def add_event(self, event):
|
def add_event(self, event):
|
||||||
|
if not self.is_event_finishing_early_in_this_day(event):
|
||||||
self.events.append(event)
|
self.events.append(event)
|
||||||
if event.category is None:
|
if event.category is None:
|
||||||
if not "" in self.events_by_category:
|
if not "" in self.events_by_category:
|
||||||
|
Loading…
Reference in New Issue
Block a user