From: Tomas Babej Date: Wed, 31 Dec 2014 18:25:04 +0000 (+0100) Subject: Task: Use empty string as replacement for None when saving the task X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/2d8c5d27136bb01c044b91becfbb532ebcd3327a?ds=sidebyside;hp=6adf5e34ed35f8b5d9975867c92096f4b9bc080f Task: Use empty string as replacement for None when saving the task --- diff --git a/tasklib/task.py b/tasklib/task.py index 1fa3faa..4377f1f 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -302,7 +302,8 @@ class Task(TaskResource): elif field == 'depends': args.append('{0}:{1}'.format(field, self.format_depends())) else: - args.append('{0}:{1}'.format(field, self._data[field])) + # Use empty string to substitute for None value + args.append('{0}:{1}'.format(field, self._data[field] or '')) # If we're modifying saved task, simply pass on all modified fields if self.saved: