diff --git a/trello/__init__.py b/trello/__init__.py index 7df736cd..05c01cb4 100644 --- a/trello/__init__.py +++ b/trello/__init__.py @@ -809,6 +809,8 @@ def fetch(self, eager=True): # For consistency, due date is in YYYY-MM-DD format if json_obj.get('due', ''): self.due = json_obj.get('due', '')[:10] + else: + self.due = '' self.checked = json_obj['checkItemStates'] self.dateLastActivity = dateparser.parse(json_obj['dateLastActivity']) @@ -906,7 +908,7 @@ def create_date(self): @property def due_date(self): - return dateparser.parse(self.due) + return dateparser.parse(self.due) if self.due else '' def set_name(self, new_name): """