Order Pokemon.items() by rarity descending.

This commit is contained in:
Lynn "Zhorken" Vaughan 2012-06-22 23:18:56 -04:00
parent 6e9bab427a
commit bf8d94ef08

View file

@ -1992,6 +1992,7 @@ Pokemon.default_form = relationship(PokemonForm,
doc=u"A representative form of this pokémon") doc=u"A representative form of this pokémon")
Pokemon.items = relationship(PokemonItem, Pokemon.items = relationship(PokemonItem,
backref='pokemon', backref='pokemon',
order_by=PokemonItem.rarity.desc(),
doc=u"Info about items this pokémon holds in the wild") doc=u"Info about items this pokémon holds in the wild")
Pokemon.stats = relationship(PokemonStat, Pokemon.stats = relationship(PokemonStat,
innerjoin=True, innerjoin=True,