skip calendar events with empty title
This commit is contained in:
parent
8df85f3abb
commit
b93a4fee82
|
@ -25,11 +25,13 @@ def import_calendar(calendar):
|
|||
events = {}
|
||||
for event in cal.walk("vevent"):
|
||||
uid = event.decoded("uid").decode()
|
||||
summary = event.decoded("summary").decode()
|
||||
summary = (event.decoded("summary", None) or b"").decode()
|
||||
description = (event.decoded("description", None) or b"").decode()
|
||||
start = event.decoded("dtstart").astimezone(timezone.utc)
|
||||
end = event.decoded("dtend").astimezone(timezone.utc)
|
||||
location = event.decoded("location", None)
|
||||
if not summary:
|
||||
continue
|
||||
if location is not None:
|
||||
location = location.decode()
|
||||
|
||||
|
|
Loading…
Reference in New Issue