aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2025-04-27 17:11:00 +0100
committerGravatar Chris Lovering <[email protected]>2025-04-27 17:11:00 +0100
commit434387b56ba5c343950bea424729d9a507fe67ad (patch)
treeace8b7f154e433fc226bfbf67356e2b232ffd889
parentDisable VERIFY_X509_STRICT checking on cluster connection (diff)
Only attempt to get secret value if grafana token is not none
-rw-r--r--arthur/apis/grafana/teams.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/arthur/apis/grafana/teams.py b/arthur/apis/grafana/teams.py
index c058108..cba903c 100644
--- a/arthur/apis/grafana/teams.py
+++ b/arthur/apis/grafana/teams.py
@@ -2,7 +2,8 @@ import aiohttp
from arthur.config import CONFIG
-AUTH_HEADER = {"Authorization": f"Bearer {CONFIG.grafana_token.get_secret_value()}"}
+if CONFIG.grafana_token:
+ AUTH_HEADER = {"Authorization": f"Bearer {CONFIG.grafana_token.get_secret_value()}"}
async def list_teams(session: aiohttp.ClientSession) -> dict[str, str]: