add a fallback accountSid for account users (#238)

Co-authored-by: eglehelms <e.helms@cognigy.com>
This commit is contained in:
EgleH
2023-04-24 13:47:42 +02:00
committed by GitHub
parent 7051985aad
commit 6712d8944b
+2 -2
View File
@@ -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();