From 449e345ee56c137935016867b5f442837b050489 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 17 Jul 2024 03:41:05 +0000 Subject: [PATCH] Ignore that users do not have access to metrics Fixes #190 The templates appear to handle this being False, so that seems the path of least resistance. --- snikket_web/user.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/snikket_web/user.py b/snikket_web/user.py index 56c6e3e..9b3970b 100644 --- a/snikket_web/user.py +++ b/snikket_web/user.py @@ -97,7 +97,10 @@ class ImportAccountDataForm(BaseForm): @client.require_session() async def index() -> str: user_info = await client.get_user_info() - metrics = await client.get_system_metrics() + try: + metrics = await client.get_system_metrics() + except: + metrics = False return await render_template( "user_home.html", user_info=user_info,