Improved code

This commit is contained in:
Maximilian Giller 2019-05-01 07:22:27 +02:00
parent 5dcae2d435
commit 07c2484849

View file

@ -113,12 +113,8 @@ class DayViewPanel (PanelDesign):
allday_ev.append(event) allday_ev.append(event)
elif event.multiday: elif event.multiday:
if self.__is_today__(event.begin_datetime): if self.__is_today__(event.begin_datetime):
today = date.today()
tzinfo = event.end_datetime.tzinfo
timed_ev.append(event) timed_ev.append(event)
elif self.__is_today__(event.end_datetime): elif self.__is_today__(event.end_datetime):
today = date.today()
tzinfo = event.begin_datetime.tzinfo
timed_ev.append(event) timed_ev.append(event)
else: else:
allday_ev.append(event) allday_ev.append(event)