From 4f012fe8f9f61508b6cb60a6785c1d21ec970302 Mon Sep 17 00:00:00 2001 From: Andrew Dryga Date: Wed, 3 Apr 2024 09:54:44 -0600 Subject: [PATCH] hotfix: enforce default address description while it's hidden --- elixir/apps/domain/lib/domain/resources/resource/changeset.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elixir/apps/domain/lib/domain/resources/resource/changeset.ex b/elixir/apps/domain/lib/domain/resources/resource/changeset.ex index a0f151937..6f5a0a6e7 100644 --- a/elixir/apps/domain/lib/domain/resources/resource/changeset.ex +++ b/elixir/apps/domain/lib/domain/resources/resource/changeset.ex @@ -152,6 +152,8 @@ defmodule Domain.Resources.Resource.Changeset do changeset |> validate_length(:name, min: 1, max: 255) |> validate_length(:address_description, min: 1, max: 512) + # TODO: remove once address_description is visible again + |> copy_change(:address, :address_description) |> cast_embed(:filters, with: &cast_filter/2) |> unique_constraint(:ipv4, name: :resources_account_id_ipv4_index) |> unique_constraint(:ipv6, name: :resources_account_id_ipv6_index)