Check todoist due date is not None in async_get_events (#36140)

* Check that due date is not None

Check that due date is not None, prevents taks without due dates from breaking Calendar API

* Invert None check to reduce indentation
This commit is contained in:
Steven Rollason 2020-05-26 15:39:53 +01:00 committed by GitHub
parent f8416484f8
commit 514c64619a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,6 +500,8 @@ class TodoistProjectData:
events = []
for task in project_task_data:
if task["due"] is None:
continue
due_date = _parse_due_date(task["due"])
if start_date < due_date < end_date:
event = {