forum pages without polls have no active poll

This commit is contained in:
byte[] 2020-09-10 13:05:37 -04:00
parent 5c87e62179
commit 5287cf0430

View file

@ -109,4 +109,6 @@ defmodule Philomena.Polls do
|> where([p], p.id == ^poll_id and p.active_until > ^now)
|> Repo.exists?()
end
def active?(_poll), do: false
end