philomena-dev/philomena

Missing deleted filter on featured lookup

Closed this issue · 1 comments

featured_image =
Image
|> join(:inner, [i], f in ImageFeature, on: [image_id: i.id])
|> filter_hidden(user, conn.params["hidden"])
|> order_by([i, f], desc: f.created_at)
|> limit(1)
|> preload(tags: :aliases)
|> Repo.one()

Probably need to add here too:

featured_image =
Image
|> join(:inner, [i], f in ImageFeature, on: [image_id: i.id])
|> order_by([_i, f], desc: f.created_at)
|> limit(1)
|> preload([:user, :intensity, tags: :aliases])
|> Repo.one()