From 7fac2c786c4037cedbd7997c088ebcca898d9487 Mon Sep 17 00:00:00 2001 From: William Wills Date: Wed, 30 Oct 2024 10:42:06 -0400 Subject: [PATCH] feat: mirror check adds governance mirrors if non-governance instance --- src/tasks/mirror-check.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/tasks/mirror-check.js b/src/tasks/mirror-check.js index a2d8a8c8..632ac468 100644 --- a/src/tasks/mirror-check.js +++ b/src/tasks/mirror-check.js @@ -87,13 +87,17 @@ const runMirrorCheck = async () => { GOVERNANCE_CONFIG.GOVERNANCE_BODY_ID, ); - // add governance mirrors if non-governance instance - await Organization.addMirror( - GOVERNANCE_CONFIG.GOVERNANCE_BODY_ID, - mirrorUrl, - true, - ); - await Organization.addMirror(governanceStoreValue, mirrorUrl, true); + if (governanceStoreValue?.v1) { + // add governance mirrors if non-governance instance + await Organization.addMirror( + GOVERNANCE_CONFIG.GOVERNANCE_BODY_ID, + mirrorUrl, + true, + ); + await Organization.addMirror(governanceStoreValue, mirrorUrl, true); + } else { + logger.warn('error adding governance mirrors'); + } } const organizations = await Organization.getOrgsMap();