Filter out non-comment stories
This commit is contained in:
@@ -63,6 +63,6 @@ class AsanaService(object):
|
||||
))
|
||||
|
||||
def get_stories(self, task_id):
|
||||
return self.__wrap__(Story,
|
||||
self.client.stories.find_by_task(task_id)
|
||||
)
|
||||
stories = self.client.stories.find_by_task(task_id)
|
||||
filtered_stories = filter(lambda s: s['type'] == 'comment', stories)
|
||||
return self.__wrap__(Story, filtered_stories)
|
||||
|
||||
@@ -26,10 +26,12 @@ class TaskDetails(object):
|
||||
TaskRow(t, on_subtask_click) for t in task.subtasks()
|
||||
]))
|
||||
|
||||
body = body + [
|
||||
urwid.Divider('-'),
|
||||
Stories(stories).component()
|
||||
]
|
||||
stories = list(stories)
|
||||
if (len(stories) > 0):
|
||||
body = body + [
|
||||
urwid.Divider('-'),
|
||||
Stories(stories).component()
|
||||
]
|
||||
|
||||
self.details = urwid.ListBox(urwid.SimpleFocusListWalker(body))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user