fix featured image selection

This commit is contained in:
byte[] 2019-10-04 19:16:50 -04:00
parent 0e86ead40e
commit 2359742d05

View file

@ -63,7 +63,7 @@ defmodule PhilomenaWeb.ActivityController do
featured_image =
Image
|> join(:inner, [i], f in Feature, on: [id: f.image_id])
|> join(:inner, [i], f in Feature, on: [id: i.image_id])
|> order_by([i, f], desc: f.created_at)
|> limit(1)
|> Repo.one()