1
mirror of https://github.com/home-assistant/core synced 2024-10-07 10:13:38 +02:00

Fix "vevent" KeyError in caldav component again (#65685)

* Fix "vevent" KeyError in caldav component again

* code formatting
This commit is contained in:
jkuettner 2022-02-04 18:47:31 +01:00 committed by GitHub
parent 5519888dc1
commit 42024c1ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,7 +232,11 @@ class WebDavCalendarData:
new_events.append(new_event)
elif _start_of_tomorrow <= start_dt:
break
vevents = [event.instance.vevent for event in results + new_events]
vevents = [
event.instance.vevent
for event in results + new_events
if hasattr(event.instance, "vevent")
]
# dtstart can be a date or datetime depending if the event lasts a
# whole day. Convert everything to datetime to be able to sort it