Merge pull request 'fix: sort /teams/{id}/evolutions by current_tier desc, current_value desc (#116)' (#120) from ai/paper-dynasty-database-116 into next-release
Some checks failed
Build Docker Image / build (push) Has been cancelled
Some checks failed
Build Docker Image / build (push) Has been cancelled
Reviewed-on: #120 Reviewed-by: Claude <cal.corum+openclaw@gmail.com>
This commit is contained in:
commit
dc163e0ddd
@ -1544,8 +1544,8 @@ async def list_team_evolutions(
|
||||
Joins EvolutionCardState → EvolutionTrack (for card_type filtering and
|
||||
threshold context) and EvolutionCardState → Player (for player_name),
|
||||
both eager-loaded in a single query. Results are paginated via
|
||||
page/per_page (1-indexed pages); items are ordered by player_id for
|
||||
stable ordering.
|
||||
page/per_page (1-indexed pages); items are ordered by current_tier DESC,
|
||||
current_value DESC so the most-progressed cards appear first.
|
||||
|
||||
Query parameters:
|
||||
card_type -- filter to states whose track.card_type matches (e.g. 'batter', 'sp')
|
||||
@ -1572,7 +1572,10 @@ async def list_team_evolutions(
|
||||
.switch(EvolutionCardState)
|
||||
.join(Player)
|
||||
.where(EvolutionCardState.team == team_id)
|
||||
.order_by(EvolutionCardState.player_id)
|
||||
.order_by(
|
||||
EvolutionCardState.current_tier.desc(),
|
||||
EvolutionCardState.current_value.desc(),
|
||||
)
|
||||
)
|
||||
|
||||
if card_type is not None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user