mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
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:
parent
f8416484f8
commit
514c64619a
@ -500,6 +500,8 @@ class TodoistProjectData:
|
|||||||
|
|
||||||
events = []
|
events = []
|
||||||
for task in project_task_data:
|
for task in project_task_data:
|
||||||
|
if task["due"] is None:
|
||||||
|
continue
|
||||||
due_date = _parse_due_date(task["due"])
|
due_date = _parse_due_date(task["due"])
|
||||||
if start_date < due_date < end_date:
|
if start_date < due_date < end_date:
|
||||||
event = {
|
event = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user