From 5287cf04305863b6c8ae1609a5ccdf7f723fcf0c Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 10 Sep 2020 13:05:37 -0400 Subject: [PATCH] forum pages without polls have no active poll --- lib/philomena/polls.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/philomena/polls.ex b/lib/philomena/polls.ex index 13a4f37e..5dce91be 100644 --- a/lib/philomena/polls.ex +++ b/lib/philomena/polls.ex @@ -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