Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix attribute update

dominik-zeglen3d7aa7e167f2
diff --git a/saleor/static/dashboard-next/attributes/views/AttributeDetails/AttributeDetails.tsx b/saleor/static/dashboard-next/attributes/views/AttributeDetails/AttributeDetails.tsx
index ca1f2191af..62a92ff7da 100644
--- a/saleor/static/dashboard-next/attributes/views/AttributeDetails/AttributeDetails.tsx
+++ b/saleor/static/dashboard-next/attributes/views/AttributeDetails/AttributeDetails.tsx
@@ -163,7 +163,12 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
)}
onBack={() => navigate(attributeListUrl())}
onDelete={() => openModal("remove")}
- onSubmit={input =>
+ onSubmit={data => {
+ const input = {
+ ...data,
+ inputType: undefined
+ };
+
attributeUpdate({
variables: {
id,
@@ -175,8 +180,8 @@ const AttributeDetails: React.FC<AttributeDetailsProps> = ({ id, params }) => {
)
}
}
- })
- }
+ });
+ }}
onValueAdd={() => openModal("add-value")}
onValueDelete={id =>
openModal("remove-value", id)