forked from potsda.mn/mobilizon
Add constraint on the comment url
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
614ead1777
commit
4a1e9ce713
|
@ -126,6 +126,7 @@ defmodule Mobilizon.Discussions.Comment do
|
||||||
|> put_assoc(:media, Map.get(attrs, :media, []))
|
|> put_assoc(:media, Map.get(attrs, :media, []))
|
||||||
|> put_tags(attrs)
|
|> put_tags(attrs)
|
||||||
|> put_mentions(attrs)
|
|> put_mentions(attrs)
|
||||||
|
|> unique_constraint(:url, name: :comments_url_index)
|
||||||
end
|
end
|
||||||
|
|
||||||
@spec maybe_generate_uuid(Ecto.Changeset.t()) :: Ecto.Changeset.t()
|
@spec maybe_generate_uuid(Ecto.Changeset.t()) :: Ecto.Changeset.t()
|
||||||
|
|
Loading…
Reference in a new issue