From fd711c4d124fd7adcada3b1dfe415c626e6659e3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 22 Oct 2020 16:58:18 +0200 Subject: [PATCH] When filter on public group events, exclude draft events as well Signed-off-by: Thomas Citharel --- lib/mobilizon/events/events.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mobilizon/events/events.ex b/lib/mobilizon/events/events.ex index 7270c6d61..904e7ccf8 100644 --- a/lib/mobilizon/events/events.ex +++ b/lib/mobilizon/events/events.ex @@ -1704,7 +1704,7 @@ defmodule Mobilizon.Events do defp event_filter_visibility(query, :public) do query - |> where(visibility: ^:public) + |> where(visibility: ^:public, draft: false) end defp event_filter_begins_on(query, nil, nil),