From 40e71489d8304c02a42ad2628232e8e9d601ffd4 Mon Sep 17 00:00:00 2001 From: Sacha Al Himdani Date: Mon, 9 Mar 2026 18:19:39 +0100 Subject: [PATCH] Fix person update Signed-off-by: Sacha Al Himdani --- .../organizations/people/_components/PersonForm.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/console/src/pages/iam/organizations/people/_components/PersonForm.tsx b/apps/console/src/pages/iam/organizations/people/_components/PersonForm.tsx index 6c502c50a..9a2133416 100644 --- a/apps/console/src/pages/iam/organizations/people/_components/PersonForm.tsx +++ b/apps/console/src/pages/iam/organizations/people/_components/PersonForm.tsx @@ -124,10 +124,8 @@ export function PersonForm(props: { }, ); const handleSubmit = handleSubmitWrapper(async (data: z.infer) => { - const input = { + const sharedInput = { fullName: data.fullName, - emailAddress: data.emailAddress, - role: data.role, additionalEmailAddresses: data.additionalEmailAddresses, kind: data.kind, position: data.position, @@ -137,7 +135,7 @@ export function PersonForm(props: { if (id) { await updatePerson({ - variables: { input: { ...input, id } }, + variables: { input: { ...sharedInput, id } }, onCompleted: () => { reset(data); onSubmit?.(); @@ -146,7 +144,12 @@ export function PersonForm(props: { } else { await createPerson({ variables: { - input: { ...input, organizationId }, + input: { + ...sharedInput, + emailAddress: data.emailAddress, + role: data.role, + organizationId, + }, connections: [connectionId], }, onCompleted: () => {