Pokemon.types should order by slot. #220
authorEevee <git@veekun.com>
Sun, 9 May 2010 05:39:06 +0000 (22:39 -0700)
committerEevee <git@veekun.com>
Mon, 10 May 2010 04:47:07 +0000 (21:47 -0700)
pokedex/db/tables.py

index 8ae80d8..b9a5fea 100644 (file)
@@ -785,7 +785,7 @@ Pokemon.items = relation(PokemonItem, backref='pokemon')
 Pokemon.generation = relation(Generation, backref='pokemon')
 Pokemon.shape = relation(PokemonShape, backref='pokemon')
 Pokemon.stats = relation(PokemonStat, backref='pokemon')
-Pokemon.types = relation(Type, secondary=PokemonType.__table__)
+Pokemon.types = relation(Type, secondary=PokemonType.__table__, order_by=PokemonType.slot.asc())
 
 PokemonDexNumber.pokedex = relation(Pokedex)