From a86bf81768bc050f49557be4d2da8d9a01ac3f93 Mon Sep 17 00:00:00 2001
From: Juggels <bernd@bjws.nl>
Date: Thu, 15 Mar 2018 21:43:20 +0100
Subject: [PATCH] Fix 'dict' object has no attribute 'strftime' (#13215)

* Fix 'dict' object has no attribute 'strftime'

* Clear existing list instead of new object
---
 homeassistant/components/calendar/todoist.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/homeassistant/components/calendar/todoist.py b/homeassistant/components/calendar/todoist.py
index c5ae1dd3c11..02840c7d0ee 100644
--- a/homeassistant/components/calendar/todoist.py
+++ b/homeassistant/components/calendar/todoist.py
@@ -496,6 +496,10 @@ class TodoistProjectData(object):
             # We had no valid tasks
             return True
 
+        # Make sure the task collection is reset to prevent an
+        # infinite collection repeating the same tasks
+        self.all_project_tasks.clear()
+
         # Organize the best tasks (so users can see all the tasks
         # they have, organized)
         while project_tasks:
-- 
GitLab