diff options
Diffstat (limited to 'lib/pleroma/pagination.ex')
-rw-r--r-- | lib/pleroma/pagination.ex | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pleroma/pagination.ex b/lib/pleroma/pagination.ex index 9d279fba7..183ef770e 100644 --- a/lib/pleroma/pagination.ex +++ b/lib/pleroma/pagination.ex @@ -35,7 +35,10 @@ defmodule Pleroma.Pagination do end def fetch_paginated(query, %{"total" => true} = params, :offset) do - total = Repo.aggregate(query, :count, :id) + total = + query + |> Ecto.Query.exclude(:left_join) + |> Repo.aggregate(:count, :id) %{ total: total, |