Fix type confusion bug in recurring events
This commit is contained in:
parent
7dad5ff034
commit
58145fe178
1 changed files with 2 additions and 0 deletions
|
@ -26,6 +26,8 @@ def _parse_recurring(event: cal.Event, start: datetime, end: datetime, duration:
|
||||||
occurences: List[datetime] = []
|
occurences: List[datetime] = []
|
||||||
|
|
||||||
evstart = event.get('dtstart').dt
|
evstart = event.get('dtstart').dt
|
||||||
|
if isinstance(evstart, date) and not isinstance(evstart, datetime):
|
||||||
|
evstart = datetime(evstart.year, evstart.month, evstart.day, tzinfo=start.tzinfo)
|
||||||
# First occurence lies in the future; no need to process further
|
# First occurence lies in the future; no need to process further
|
||||||
if evstart >= end:
|
if evstart >= end:
|
||||||
return occurences
|
return occurences
|
||||||
|
|
Loading…
Reference in a new issue