Set default sort on teams #7
@ -139,6 +139,9 @@ class TeamService(BaseService):
|
|||||||
if not cls._get_team_field(t, "abbrev", "").endswith(("IL", "MiL"))
|
if not cls._get_team_field(t, "abbrev", "").endswith(("IL", "MiL"))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Sort by team ID ascending
|
||||||
|
teams_list.sort(key=lambda t: cls._get_team_field(t, 'id', 0))
|
||||||
|
|
||||||
# Convert to dicts
|
# Convert to dicts
|
||||||
teams_data = [cls._team_to_dict(t, short_output) for t in teams_list]
|
teams_data = [cls._team_to_dict(t, short_output) for t in teams_list]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user