mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Fix a many-to-many join bug with evolutions.
This commit is contained in:
parent
cd24ebe9ca
commit
672caf7aa9
1 changed files with 1 additions and 2 deletions
|
@ -795,11 +795,10 @@ Pokemon.egg_groups = relation(EggGroup, secondary=PokemonEggGroup.__table__,
|
|||
backref='pokemon')
|
||||
Pokemon.evolution_chain = relation(EvolutionChain, backref='pokemon')
|
||||
Pokemon.evolution_children = relation(Pokemon,
|
||||
secondary=PokemonEvolution.__table__,
|
||||
primaryjoin=Pokemon.id==PokemonEvolution.from_pokemon_id,
|
||||
secondary=PokemonEvolution.__table__,
|
||||
secondaryjoin=PokemonEvolution.to_pokemon_id==Pokemon.id,
|
||||
backref=backref('evolution_parent',
|
||||
remote_side=[Pokemon.id],
|
||||
uselist=False,
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue