]> git.madduck.net Git - etc/taskwarrior.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Task: Properly handle None in serialize_due
authorTomas Babej <tomasbabej@gmail.com>
Thu, 1 Jan 2015 19:11:38 +0000 (20:11 +0100)
committerTomas Babej <tomasbabej@gmail.com>
Thu, 1 Jan 2015 19:11:38 +0000 (20:11 +0100)
tasklib/task.py

index 4377f1fb8f1737d730a7cb782c1a2d5f74ba3cd6..5acabe0e2952ecc032002c00079586655ec9fbe1 100644 (file)
@@ -165,6 +165,8 @@ class Task(TaskResource):
         return self['uuid'] is not None or self['id'] is not None
 
     def serialize_due(self, date):
         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):
         return date.strftime(DATE_FORMAT)
 
     def deserialize_due(self, date_str):