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,6 +26,8 @@ class TaskDetails(object):
|
|||||||
TaskRow(t, on_subtask_click) for t in task.subtasks()
|
TaskRow(t, on_subtask_click) for t in task.subtasks()
|
||||||
]))
|
]))
|
||||||
|
|
||||||
|
stories = list(stories)
|
||||||
|
if (len(stories) > 0):
|
||||||
body = body + [
|
body = body + [
|
||||||
urwid.Divider('-'),
|
urwid.Divider('-'),
|
||||||
Stories(stories).component()
|
Stories(stories).component()
|
||||||
|
|||||||
Reference in New Issue
Block a user