Skip to content

Commit

Permalink
Fix artist name sorter (#3912)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson committed Sep 21, 2022
1 parent da6aeeb commit c2c9502
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion discovery-provider/src/queries/get_save_tracks.py
Expand Up @@ -85,7 +85,7 @@ def get_save_tracks(args: GetSaveTracksArgs):
elif sort_method == SortMethod.artist_name:
base_query = base_query.join(
TrackWithAggregates.user, aliased=True
).order_by(sort_fn(TrackWithAggregates.user.name))
).order_by(sort_fn(User.name))
elif sort_method == SortMethod.release_date:
base_query = base_query.order_by(
sort_fn(
Expand Down
2 changes: 1 addition & 1 deletion discovery-provider/src/queries/get_tracks.py
Expand Up @@ -140,7 +140,7 @@ def _get_tracks(session, args):
elif sort_method == SortMethod.artist_name:
base_query = base_query.join(
TrackWithAggregates.user, aliased=True
).order_by(sort_fn(TrackWithAggregates.user.name))
).order_by(sort_fn(User.name))
elif sort_method == SortMethod.release_date:
base_query = base_query.order_by(
sort_fn(
Expand Down
Expand Up @@ -104,7 +104,7 @@ def _get_user_listening_history(session: Session, args: GetUserListeningHistoryA
base_query = base_query.order_by(sort_fn(TrackWithAggregates.title))
elif sort_method == SortMethod.artist_name:
base_query = base_query.join(TrackWithAggregates.user, aliased=True).order_by(
sort_fn(TrackWithAggregates.user.name)
sort_fn(User.name)
)
elif sort_method == SortMethod.release_date:
base_query = base_query.order_by(
Expand Down

0 comments on commit c2c9502

Please sign in to comment.