Only consider relevant events for category statistics
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ce38361d65
commit
8812122168
|
@ -1632,6 +1632,10 @@ defmodule Mobilizon.Events do
|
|||
|
||||
def category_statistics do
|
||||
Event
|
||||
|> filter_future_events(true)
|
||||
|> filter_public_visibility()
|
||||
|> filter_draft()
|
||||
|> filter_cancelled_events()
|
||||
|> filter_local_or_from_followed_instances_events()
|
||||
|> group_by([e], e.category)
|
||||
|> select([e], {e.category, count(e.id)})
|
||||
|
|
Loading…
Reference in a new issue