X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/7bd8343eef3301ee695dde133a600ff046a6997e..75dea64c1fbf2464c489abf4611ea6952ed60f2d:/tasklib/task.py diff --git a/tasklib/task.py b/tasklib/task.py index 6fbce77..491a374 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -44,6 +44,9 @@ class TaskResource(object): s = s.encode('utf-8') return s + def __repr__(self): + return str(self) + class TaskAnnotation(TaskResource): read_only_fields = ['entry', 'description'] @@ -156,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):