X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fpagination.ex;h=4535ca7c5c2b65d3d68b9acf469996ccfec8da51;hb=6a716e3fe5290df80af72e3ad5e45ee3afb581a8;hp=6321c26007582d47c539297921ce5505e2a12a90;hpb=88f7cf51d43181b27db5ff1807d3e706fa336bac;p=akkoma diff --git a/lib/pleroma/pagination.ex b/lib/pleroma/pagination.ex index 6321c2600..4535ca7c5 100644 --- a/lib/pleroma/pagination.ex +++ b/lib/pleroma/pagination.ex @@ -38,7 +38,10 @@ defmodule Pleroma.Pagination do end def fetch_paginated(query, %{"total" => true} = params, :offset, table_binding) do - total = Repo.aggregate(query, :count, :id) + total = + query + |> Ecto.Query.exclude(:left_join) + |> Repo.aggregate(:count, :id) %{ total: total,