mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
ensure that site notices are live when selected
This commit is contained in:
parent
40debb9634
commit
0c5860c457
1 changed files with 1 additions and 0 deletions
|
@ -21,6 +21,7 @@ defmodule Philomena.SiteNotices do
|
|||
now = DateTime.utc_now()
|
||||
|
||||
SiteNotice
|
||||
|> where(live: true)
|
||||
|> where([n], n.start_date < ^now and n.finish_date > ^now)
|
||||
|> order_by(desc: :start_date)
|
||||
|> Repo.all()
|
||||
|
|
Loading…
Reference in a new issue