From b5e9eb462088fc293ee7c7d3f8629c412e03e293 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 3 Jan 2023 10:49:25 -0500 Subject: [PATCH] Use default attributes in import form (#4052) --- apps/admin-ui/src/clients/import/ImportForm.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/admin-ui/src/clients/import/ImportForm.tsx b/apps/admin-ui/src/clients/import/ImportForm.tsx index fda001b9f9..6ea460d94f 100644 --- a/apps/admin-ui/src/clients/import/ImportForm.tsx +++ b/apps/admin-ui/src/clients/import/ImportForm.tsx @@ -87,7 +87,10 @@ export default function ImportForm() { try { const newClient = await adminClient.clients.create({ ...imported, - ...convertFormValuesToObject(client), + ...convertFormValuesToObject({ + ...client, + attributes: client.attributes || {}, + }), }); addAlert(t("clientImportSuccess"), AlertVariant.success); navigate(toClient({ realm, clientId: newClient.id, tab: "settings" }));