From bf8d94ef082c22abe238691c571914f9b44967cf Mon Sep 17 00:00:00 2001 From: "Lynn \"Zhorken\" Vaughan" Date: Fri, 22 Jun 2012 23:18:56 -0400 Subject: [PATCH] Order Pokemon.items() by rarity descending. --- pokedex/db/tables.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index ec295bd..9673122 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -1992,6 +1992,7 @@ Pokemon.default_form = relationship(PokemonForm, doc=u"A representative form of this pokémon") Pokemon.items = relationship(PokemonItem, backref='pokemon', + order_by=PokemonItem.rarity.desc(), doc=u"Info about items this pokémon holds in the wild") Pokemon.stats = relationship(PokemonStat, innerjoin=True,