From 8a7ca9dbcb52de5bf21a7c42e0e6ba9a07f79024 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sun, 15 Dec 2019 10:36:26 -0500 Subject: [PATCH] don't try to redirect when there is no tag to redirect --- lib/philomena_web/controllers/tag_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/philomena_web/controllers/tag_controller.ex b/lib/philomena_web/controllers/tag_controller.ex index 90308f30..ed01bfb8 100644 --- a/lib/philomena_web/controllers/tag_controller.ex +++ b/lib/philomena_web/controllers/tag_controller.ex @@ -9,7 +9,7 @@ defmodule PhilomenaWeb.TagController do plug PhilomenaWeb.RecodeParameterPlug, [name: "id"] when action in [:show] plug PhilomenaWeb.CanaryMapPlug, update: :edit plug :load_and_authorize_resource, model: Tag, id_field: "slug", only: [:show, :edit, :update, :delete], preload: [:aliases, :aliased_tag, :implied_tags, :implied_by_tags, :dnp_entries, public_links: :user] - plug :redirect_alias + plug :redirect_alias when action in [:show, :edit, :update, :delete] def index(conn, params) do query_string = params["tq"] || "*"