#1308 update build_page() to permit query with group_by()
Using Repo.aggregate() to count the total of elements is incompatible with group_by(). Changing this to a subquery with a count(*) of results permit to use group_by().
This commit is contained in:
@@ -73,7 +73,7 @@ defmodule Mobilizon.Instances do
|
||||
query
|
||||
end
|
||||
|
||||
%Page{elements: elements} = paged_instances = Page.build_page(query, page, limit, :domain)
|
||||
%Page{elements: elements} = paged_instances = Page.build_page(query, page, limit)
|
||||
|
||||
%Page{
|
||||
paged_instances
|
||||
|
||||
Reference in New Issue
Block a user