Skip to content

Commit

Permalink
fetch_checklists: allow the list to be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericlepied committed Dec 21, 2014
1 parent 80f7ff9 commit ee43db9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions trello/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,11 +585,11 @@ def fetch_comments(self):

def fetch_checklists(self):
checklists = []
if self.badges['checkItems'] > 0:
json_obj = self.client.fetch_json(
'/cards/' + self.id + '/checklists', )
for cl in json_obj:
checklists.append(Checklist(self.client, self.checked, cl, trello_card=self.id))
json_obj = self.client.fetch_json(
'/cards/' + self.id + '/checklists', )
for cl in json_obj:
checklists.append(Checklist(self.client, self.checked, cl,
trello_card=self.id))
return checklists

def fetch_actions(self, action_filter='createCard'):
Expand Down

0 comments on commit ee43db9

Please sign in to comment.