Fix incorrect report count
This commit is contained in:
parent
4453a9cb73
commit
08c89fd2b8
3 changed files with 11 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue