From 6712d8944b431f6f5f1925324cf5a8c8e1beea27 Mon Sep 17 00:00:00 2001 From: EgleH Date: Mon, 24 Apr 2023 13:47:42 +0200 Subject: [PATCH] add a fallback accountSid for account users (#238) Co-authored-by: eglehelms --- src/containers/internal/views/users/form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/internal/views/users/form.tsx b/src/containers/internal/views/users/form.tsx index 8dd39aa..f49a283 100644 --- a/src/containers/internal/views/users/form.tsx +++ b/src/containers/internal/views/users/form.tsx @@ -122,7 +122,7 @@ export const UserForm = ({ user }: UserFormProps) => { account_sid: scope !== USER_ACCOUNT && currentUser?.scope !== USER_ACCOUNT ? null - : accountSid, + : accountSid || currentUser?.account_sid, }) .then(() => { toastSuccess("User created successfully"); @@ -152,7 +152,7 @@ export const UserForm = ({ user }: UserFormProps) => { account_sid: scope !== USER_ACCOUNT && currentUser?.scope !== USER_ACCOUNT ? null - : accountSid, + : accountSid || currentUser?.account_sid, }) .then(() => { user.refetch();