From 41504547361f35f26652ae1ba06821a15903af30 Mon Sep 17 00:00:00 2001 From: Sam Machin Date: Tue, 11 Nov 2025 13:30:30 +0000 Subject: [PATCH] remove no SP gateways if Account Gateways (#219) --- lib/db-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db-utils.js b/lib/db-utils.js index 5f2d415..41238bc 100644 --- a/lib/db-utils.js +++ b/lib/db-utils.js @@ -294,7 +294,7 @@ module.exports = (srf, logger) => { /* get all the carriers and gateways for the account owning this sip realm */ const [gwAcc] = await pp.query(sqlSelectAllCarriersForAccountByRealm, [uri.host]); - const [gwSP] = gwAcc.length ? [[]] : await pp.query(sqlSelectAllCarriersForSPByRealm, uri.host); + const [gwSP] = await pp.query(sqlSelectAllCarriersForSPByRealm, uri.host); const gw = gwAcc .concat(gwSP) .sort((a, b) => b.netmask - a.netmask);