From 7f828a4bb7d9a8c9d870bae4a111ef0fc2a14087 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Wed, 11 Oct 2023 12:59:59 -0400 Subject: [PATCH] fix: dont return homeorg when in pending status --- src/api/registry.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/api/registry.js b/src/api/registry.js index f2ee3b0..c067a1c 100644 --- a/src/api/registry.js +++ b/src/api/registry.js @@ -241,7 +241,13 @@ const getHomeOrg = async () => { (key) => response.body[key] ); - return orgArray.find((org) => org.isHome) || null; + const homeOrg = orgArray.find((org) => org.isHome) || null; + + if (homeOrg.orgUid === 'PENDING') { + return null; + } + + return homeOrg; } catch (error) { logger.error(`Could not get home org: ${error.message}`);