This commit is contained in:
byte[] 2020-04-30 17:26:34 -04:00
parent d1783cdeb8
commit 8fca87859c
2 changed files with 8 additions and 2 deletions

View file

@ -58,7 +58,11 @@ defmodule Philomena.Images.TagValidator do
cond do cond do
MapSet.size(intersection) > 0 -> MapSet.size(intersection) > 0 ->
Enum.reduce(intersection, changeset, &add_error(&2, :tag_input, "contains forbidden tag `#{&1}'")) Enum.reduce(
intersection,
changeset,
&add_error(&2, :tag_input, "contains forbidden tag `#{&1}'")
)
true -> true ->
changeset changeset

View file

@ -27,7 +27,9 @@ defmodule PhilomenaWeb.Topic.PollController do
{:ok, _poll} -> {:ok, _poll} ->
conn conn
|> put_flash(:info, "Poll successfully updated.") |> put_flash(:info, "Poll successfully updated.")
|> redirect(to: Routes.forum_topic_path(conn, :show, conn.assigns.forum, conn.assigns.topic)) |> redirect(
to: Routes.forum_topic_path(conn, :show, conn.assigns.forum, conn.assigns.topic)
)
{:error, changeset} -> {:error, changeset} ->
render(conn, "edit.html", changeset: changeset) render(conn, "edit.html", changeset: changeset)