Skip to content

Commit

Permalink
Merge pull request #191 from snikket-im/fix/issue190
Browse files Browse the repository at this point in the history
Ignore that users do not have access to metrics
  • Loading branch information
mwild1 authored Aug 11, 2024
2 parents 51798ec + 5015c4a commit 265ca4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
18 changes: 9 additions & 9 deletions snikket_web/translations/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-04-30 10:52+0100\n"
"POT-Creation-Date: 2024-08-11 16:36+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"
"Generated-By: Babel 2.16.0\n"

#: snikket_web/admin.py:69 snikket_web/templates/admin_delete_user.html:10
#: snikket_web/templates/admin_edit_circle.html:73
Expand Down Expand Up @@ -334,7 +334,7 @@ msgid ""
msgstr ""

#: snikket_web/invite.py:299 snikket_web/templates/unauth.html:18
#: snikket_web/user.py:189
#: snikket_web/user.py:192
msgid "Error"
msgstr ""

Expand Down Expand Up @@ -406,29 +406,29 @@ msgstr ""
msgid "Upload"
msgstr ""

#: snikket_web/user.py:122
#: snikket_web/user.py:125
msgid "Incorrect password."
msgstr ""

#: snikket_web/user.py:126
#: snikket_web/user.py:129
msgid "Password changed"
msgstr ""

#: snikket_web/user.py:134
#: snikket_web/user.py:137
msgid ""
"The chosen avatar is too big. To be able to upload larger avatars, please"
" use the app."
msgstr ""

#: snikket_web/user.py:181
#: snikket_web/user.py:184
msgid "Profile updated"
msgstr ""

#: snikket_web/user.py:195
#: snikket_web/user.py:198
msgid "Export"
msgstr ""

#: snikket_web/user.py:213
#: snikket_web/user.py:216
msgid "You currently have no account data to export."
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion snikket_web/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (werkzeug.exceptions.Unauthorized, werkzeug.exceptions.Forbidden):
metrics = {}
return await render_template(
"user_home.html",
user_info=user_info,
Expand Down

0 comments on commit 265ca4d

Please sign in to comment.