From 301b488277b787df9cefd0f9dec8e9479b977024 Mon Sep 17 00:00:00 2001 From: poulch Date: Thu, 26 Jan 2023 16:21:22 +0100 Subject: [PATCH] Fix sending type when new attribute (#3058) --- src/attributes/components/AttributePage/AttributePage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/attributes/components/AttributePage/AttributePage.tsx b/src/attributes/components/AttributePage/AttributePage.tsx index 2fda93f39..712c26f20 100644 --- a/src/attributes/components/AttributePage/AttributePage.tsx +++ b/src/attributes/components/AttributePage/AttributePage.tsx @@ -139,6 +139,7 @@ const AttributePage: React.FC = ({ const handleSubmit = (data: AttributePageFormData) => { const metadata = !attribute || isMetadataModified ? data.metadata : []; + const type = attribute === null ? data.type : undefined; const privateMetadata = !attribute || isPrivateMetadataModified ? data.privateMetadata : []; @@ -147,7 +148,7 @@ const AttributePage: React.FC = ({ metadata, privateMetadata, slug: data.slug || slugify(data.name).toLowerCase(), - type: data.type, + type, }); };