From 2359742d05ee991f2ceb7f96de5bd4cb6cc9c818 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Fri, 4 Oct 2019 19:16:50 -0400 Subject: [PATCH] fix featured image selection --- lib/philomena_web/controllers/activity_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena_web/controllers/activity_controller.ex b/lib/philomena_web/controllers/activity_controller.ex index 0b1ae92b..d2cf1397 100644 --- a/lib/philomena_web/controllers/activity_controller.ex +++ b/lib/philomena_web/controllers/activity_controller.ex @@ -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()