Skip to content

Commit

Permalink
members : comments are sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
nMustaki committed Jul 26, 2015
1 parent f4ebdc4 commit daf6bbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trello/member.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ def fetch(self):
return self

def fetch_comments(self):
comments = []
if self.badges['comments'] > 0:
comments = self.client.fetch_json(
'/members/' + self.id + '/actions',
query_params={'filter': 'commentCard'})
return comments
return sorted(comments, key=lambda comment: comment['date'])
return []

@classmethod
def from_json(cls, trello_client, json_obj):
Expand Down

0 comments on commit daf6bbe

Please sign in to comment.