From 4c0d71c0c2a8b190249416b29b310f4afcab755b Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Thu, 1 Jan 2015 20:11:38 +0100 Subject: [PATCH] Task: Properly handle None in serialize_due --- tasklib/task.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasklib/task.py b/tasklib/task.py index 4377f1f..5acabe0 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -165,6 +165,8 @@ class Task(TaskResource): return self['uuid'] is not None or self['id'] is not None def serialize_due(self, date): + if not date: + return None return date.strftime(DATE_FORMAT) def deserialize_due(self, date_str): -- 2.39.5