#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:
@@ -602,7 +602,7 @@ defmodule Mobilizon.Events do
|
||||
|> filter_local_or_from_followed_instances_events()
|
||||
|> filter_public_visibility()
|
||||
|> event_order(Map.get(args, :sort_by, :match_desc), search_string)
|
||||
|> Page.build_page(page, limit, :begins_on)
|
||||
|> Page.build_page(page, limit)
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
||||
Reference in New Issue
Block a user