Add unique constraint on event URL
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
2e631d3633
commit
9a135bb67f
|
@ -166,6 +166,7 @@ defmodule Mobilizon.Events.Event do
|
|||
|> put_picture(attrs)
|
||||
|> validate_lengths()
|
||||
|> validate_end_time()
|
||||
|> unique_constraint(:url)
|
||||
end
|
||||
|
||||
@spec validate_lengths(Changeset.t()) :: Changeset.t()
|
||||
|
|
Loading…
Reference in a new issue