mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-25 09:22:22 +00:00
Only consider relevant events for category statistics
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ce38361d65
commit
8812122168
1 changed files with 4 additions and 0 deletions
|
@ -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