X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/df5c2f8494d1b6ed7441e56bbf0d0a235634c2b1..03fa1e8ebe90cc8d6cda283b3498f2fe691fe5b9:/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):