diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2024-11-12 18:36:57 +0100 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2024-11-12 18:36:57 +0100 |
| commit | f6356260f456809d5b41065f477be5720b2eafc6 (patch) | |
| tree | 6515d025776432a33daf9d04d57d3c5420402274 /src/match_up | |
| parent | 92cb8fc40bf7da9d715951cbee3953e2d9c1237a (diff) | |
Added the fix for the name sort
Diffstat (limited to 'src/match_up')
| -rw-r--r-- | src/match_up/model.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/match_up/model.py b/src/match_up/model.py index bbf9827..5139de8 100644 --- a/src/match_up/model.py +++ b/src/match_up/model.py @@ -146,7 +146,7 @@ class PlayerList: return DisplayPlayer(player) def get_all_players(self) -> list[Player]: - all_players = [DisplayPlayer(p) for p in self.session.query(Player).all()] + all_players = [DisplayPlayer(p) for p in self.session.query(Player).order_by(Player.first, Player.last).all()] return all_players def get_possible_game_count(self) -> int: @@ -156,7 +156,7 @@ class PlayerList: def get_players(self, rounds: int = 0) -> list[Player]: active_players = ( - self.session.query(Player).filter(not_(Player.status == 0)).all() + self.session.query(Player).order_by(Player.first, Player.last).filter(not_(Player.status == 0)).all() ) low_guests = [ Player( |
