-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not try to transfer buddy #5752
Conversation
Was for testing only.
@Gobberwart, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LitRidl, @achretien and @anakin5 to be potential reviewers. |
@@ -31,7 +32,7 @@ def work(self): | |||
|
|||
if self.bot.config.release.get('all'): | |||
group = [p for p in inventory.pokemons().all() | |||
if p.in_fort is False and p.is_favorite is False] | |||
if not p.in_fort and not p.is_favorite and not (p.unique_id == self.buddy['id'])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no buddy, self.buddy['id']
will give an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Give me a few minutes.
Was for testing only.
# Conflicts: # pokemongo_bot/cell_workers/pokemon_optimizer.py # pokemongo_bot/cell_workers/transfer_pokemon.py
OK that should take care of buddy not set situation. @DeXtroTip, thoughts? |
It could have been something like |
I thought about that, but figured it might still generate an error if NoneType isn't iterable. Then I thought about over-complicating that one line and just decided to palm it off to another method. |
If you're happy with this change @DeXtroTip could you please approve for merge? |
Short Description:
Transfer attempt of buddy pokemon currently fails and results in endless transfer loop. Added check to both TransferPokemon and PokemonOptimizer to skip trying to transfer buddy pokemon.
Fixes/Resolves/Closes (please use correct syntax):