X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/303c3185205c2f39b2cd19b7f0adaf089ed1c8f7..9b4cc3df6a161710e26a08dab9e549292720f407:/tasklib/task.py diff --git a/tasklib/task.py b/tasklib/task.py index 040c15b..0b18a14 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -471,8 +471,13 @@ class Task(TaskResource): """ # We need to remove spaces for TW-1504, use custom separators - data = dict((key, self._serialize(key, value)) - for key, value in six.iteritems(self._data)) + data_tuples = ((key, self._serialize(key, value)) + for key, value in six.iteritems(self._data)) + + # Empty string denotes empty serialized value, we do not want + # to pass that to TaskWarrior. + data_tuples = filter(lambda t: t[1] is not '', data_tuples) + data = dict(data_tuples) return json.dumps(data, separators=(',',':')) class TaskFilter(SerializingObject):