From 014cb025fd587b15621dd357946823a85618e8be Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Mon, 28 Sep 2020 00:16:19 -0400 Subject: [PATCH] keep old slug when title is changed --- lib/philomena/topics/topic.ex | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/philomena/topics/topic.ex b/lib/philomena/topics/topic.ex index 1dd1b1c4..0434f1bf 100644 --- a/lib/philomena/topics/topic.ex +++ b/lib/philomena/topics/topic.ex @@ -116,8 +116,6 @@ defmodule Philomena.Topics.Topic do |> cast(attrs, [:title]) |> validate_required([:title]) |> validate_length(:title, min: 4, max: 96, count: :bytes) - |> put_slug() - |> unique_constraint(:slug, name: :index_topics_on_forum_id_and_slug) end def put_slug(changeset) do