diff options
Diffstat (limited to 'src/match_up/model.py')
| -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( |
