preload tags on update failure

This commit is contained in:
byte[] 2020-02-06 17:27:26 -05:00
parent 9ea7980e3f
commit f664be4f85

View file

@ -51,6 +51,10 @@ defmodule PhilomenaWeb.Image.TagController do
)
{:error, :image, changeset, _} ->
image =
image
|> Repo.preload(:tags, force: true)
conn
|> put_view(PhilomenaWeb.ImageView)
|> render("_tags.html",