mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-17 11:04:22 +01:00
always assign advert, even if nil
This commit is contained in:
parent
d1c893248d
commit
4bfb7d8dd3
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ defmodule PhilomenaWeb.AdvertPlug do
|
||||||
do: Conn.assign(conn, :advert, record_impression(Adverts.random_live_for(image)))
|
do: Conn.assign(conn, :advert, record_impression(Adverts.random_live_for(image)))
|
||||||
|
|
||||||
defp maybe_assign_ad(conn, _image, _false),
|
defp maybe_assign_ad(conn, _image, _false),
|
||||||
do: conn
|
do: Conn.assign(conn, :advert, nil)
|
||||||
|
|
||||||
defp show_ads?(%{hide_advertisements: hide}),
|
defp show_ads?(%{hide_advertisements: hide}),
|
||||||
do: !hide
|
do: !hide
|
||||||
|
|
Loading…
Reference in a new issue