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