mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Hotfix: ensure gateway name fits varchar(255)
This commit is contained in:
@@ -76,7 +76,7 @@ defmodule Domain.Gateways.Gateway.Changeset do
|
||||
defp changeset(changeset) do
|
||||
changeset
|
||||
|> trim_change(:name)
|
||||
|> validate_length(:name, min: 1, max: 256)
|
||||
|> validate_length(:name, min: 1, max: 255)
|
||||
|> unique_constraint(:name, name: :gateways_group_id_name_index)
|
||||
|> unique_constraint([:public_key])
|
||||
|> unique_constraint(:external_id)
|
||||
|
||||
@@ -786,7 +786,7 @@ defmodule Domain.GatewaysTest do
|
||||
assert {:error, changeset} = update_gateway(gateway, attrs, subject)
|
||||
|
||||
assert errors_on(changeset) == %{
|
||||
name: ["should be at most 256 character(s)"]
|
||||
name: ["should be at most 255 character(s)"]
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user