Skip to content

Commit

Permalink
Fix filter (#4925)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmadsen committed Aug 30, 2016
1 parent daca13f commit 3323a75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pokemongo_bot/cell_workers/evolve_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def work(self):

filtered_list = self._sort_and_filter()

if (len(self.evolve_list) > 0) and self.evolve_list[0] != 'all':
filtered_list = filter(lambda x: x.name in self.evolve_list, filtered_list)

if (len(self.donot_evolve_list) > 0) and self.donot_evolve_list[0] != 'none':
filtered_list = filter(lambda pokemon: pokemon.name not in donot_evolve_list, filtered_list)

Expand Down

0 comments on commit 3323a75

Please sign in to comment.