ensure options are loaded

This commit is contained in:
byte[] 2019-12-16 13:28:17 -05:00
parent a09d0d0a18
commit a28d233751

View file

@ -15,7 +15,7 @@ defmodule PhilomenaWeb.LoadTopicPlug do
Topic
|> where(forum_id: ^forum.id, slug: ^to_string(conn.params[param]))
|> preload([:user, :poll, :forum, :deleted_by])
|> preload([:user, :forum, :deleted_by, poll: :options])
|> Repo.one()
|> maybe_hide_topic(conn, show_hidden)
end