From d1f4eaabd46ee3d6401fefcc51a740f145ce2ecc Mon Sep 17 00:00:00 2001 From: James Nuanez Date: Tue, 21 Apr 2020 14:17:51 -0700 Subject: [PATCH] Accounts > Save blank SIP realm as null instead of empty string --- src/components/forms/AccountForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/forms/AccountForm.js b/src/components/forms/AccountForm.js index e60f897..3234649 100644 --- a/src/components/forms/AccountForm.js +++ b/src/components/forms/AccountForm.js @@ -187,7 +187,7 @@ const AccountForm = props => { } } - if (a.sip_realm === sipRealm) { + if (sipRealm && a.sip_realm === sipRealm) { errorMessages.push( 'The SIP Realm you have entered is already in use on another one of your accounts.' ); @@ -224,7 +224,7 @@ const AccountForm = props => { const axiosData = { name, - sip_realm: sipRealm, + sip_realm: sipRealm || null, registration_hook: { url: regWebhook, method: method,