From d7b323dca3b5ef75fdcca629d6f3a69ddccc7a2b Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Tue, 5 Nov 2024 18:07:52 -0800 Subject: [PATCH] reorganize --- .../danswer/external_permissions/confluence/group_sync.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/ee/danswer/external_permissions/confluence/group_sync.py b/backend/ee/danswer/external_permissions/confluence/group_sync.py index f65680b1c4e..60e7174a6ad 100644 --- a/backend/ee/danswer/external_permissions/confluence/group_sync.py +++ b/backend/ee/danswer/external_permissions/confluence/group_sync.py @@ -44,10 +44,10 @@ def confluence_group_sync( db_session: Session, cc_pair: ConnectorCredentialPair, ) -> None: - is_cloud = cc_pair.connector.connector_specific_config.get("is_cloud", False) - credentials = cc_pair.credential.credential_json + is_cloud = cc_pair.connector.connector_specific_config.get("is_cloud", False) wiki_base = cc_pair.connector.connector_specific_config["wiki_base"] + # test connection with direct client, no retries confluence_client = Confluence( api_version="cloud" if is_cloud else "latest", @@ -61,9 +61,9 @@ def confluence_group_sync( raise RuntimeError(f"No spaces found at {wiki_base}!") confluence_client = build_confluence_client( - credentials_json=cc_pair.credential.credential_json, + credentials_json=credentials, is_cloud=is_cloud, - wiki_base=cc_pair.connector.connector_specific_config["wiki_base"], + wiki_base=wiki_base, ) # Get all group names