diff options
author | 2025-04-27 17:11:00 +0100 | |
---|---|---|
committer | 2025-04-27 17:11:00 +0100 | |
commit | 434387b56ba5c343950bea424729d9a507fe67ad (patch) | |
tree | ace8b7f154e433fc226bfbf67356e2b232ffd889 | |
parent | Disable 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.py | 3 |
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]: |