From: Tomas Babej Date: Mon, 10 Nov 2014 00:10:01 +0000 (+0100) Subject: TaskFilter: Use empty string for None searches X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/03fa1e8ebe90cc8d6cda283b3498f2fe691fe5b9?ds=inline TaskFilter: Use empty string for None searches --- diff --git a/tasklib/task.py b/tasklib/task.py index 65679dc..491a374 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -159,6 +159,10 @@ class TaskFilter(object): def add_filter_param(self, key, value): key = key.replace('__', '.') + + # Replace the value with empty string, since that is the + # convention in TW for empty values + value = value if value is not None else '' self.filter_params.append('{0}:{1}'.format(key, value)) def get_filter_params(self):