aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/pagination.ex
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-12-06 17:17:24 +0900
committerMaxim Filippov <colixer@gmail.com>2019-12-06 17:17:24 +0900
commit08c89fd2b89614baaf4bfce067cfec9db96f2d2c (patch)
tree5e7e609ffcfbf1470e87949549571a2537396816 /lib/pleroma/pagination.ex
parent4453a9cb73ce80b8640f47f5222085f0507c2cfb (diff)
downloadpleroma-08c89fd2b89614baaf4bfce067cfec9db96f2d2c.tar.gz
Fix incorrect report count
Diffstat (limited to 'lib/pleroma/pagination.ex')
-rw-r--r--lib/pleroma/pagination.ex5
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,