From: Maxim Filippov Date: Sun, 17 Mar 2019 10:23:08 +0000 (+0300) Subject: Order users by nickname X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=93291c3d7a4dc580a2c76653521b7f6653cf4113;p=akkoma Order users by nickname --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 692ae836c..6de766fc1 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -773,7 +773,7 @@ defmodule Pleroma.User do }) :: {:ok, [Pleroma.User.t()], number()} def search_for_admin(%{query: nil, local: local, page: page, page_size: page_size}) do query = - from(u in User, order_by: u.id) + from(u in User, order_by: u.nickname) |> maybe_local_user_query(local) paginated_query = diff --git a/test/upload_test.exs b/test/upload_test.exs index 770226478..bdda01b3f 100644 --- a/test/upload_test.exs +++ b/test/upload_test.exs @@ -150,8 +150,7 @@ defmodule Pleroma.UploadTest do {:ok, data} = Upload.store(file) [attachment_url | _] = data["url"] - assert Path.basename(attachment_url["href"]) == - "an%E2%80%A6%20image.jpg" + assert Path.basename(attachment_url["href"]) == "an%E2%80%A6%20image.jpg" end test "escapes reserved uri characters" do