Order users by nickname
authorMaxim Filippov <colixer@gmail.com>
Sun, 17 Mar 2019 10:23:08 +0000 (13:23 +0300)
committerMaxim Filippov <colixer@gmail.com>
Sun, 17 Mar 2019 10:23:31 +0000 (13:23 +0300)
lib/pleroma/user.ex
test/upload_test.exs

index 692ae836c36ff0d265c6fa0e39a053e48eb56d0b..6de766fc1151f0480683d60806bff25adbb937c0 100644 (file)
@@ -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 =
index 770226478d18b4b799b2404cc3878e6d8f03ed5d..bdda01b3fd95b6d10f3619be50bed5962985e085 100644 (file)
@@ -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