mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-06-05 23:38:53 +00:00
Merge pull request #2718 from WesleyAC/broaden-dashboard-http-except
Broaden except section for HTTP request in dashboard
This commit is contained in:
commit
d17190fae3
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,6 @@ from csp.decorators import csp_update
|
||||||
|
|
||||||
from bookwyrm import models, settings
|
from bookwyrm import models, settings
|
||||||
from bookwyrm.connectors.abstract_connector import get_data
|
from bookwyrm.connectors.abstract_connector import get_data
|
||||||
from bookwyrm.connectors.connector_manager import ConnectorException
|
|
||||||
from bookwyrm.utils import regex
|
from bookwyrm.utils import regex
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,6 +60,7 @@ class Dashboard(View):
|
||||||
)
|
)
|
||||||
|
|
||||||
# check version
|
# check version
|
||||||
|
|
||||||
try:
|
try:
|
||||||
release = get_data(settings.RELEASE_API, timeout=3)
|
release = get_data(settings.RELEASE_API, timeout=3)
|
||||||
available_version = release.get("tag_name", None)
|
available_version = release.get("tag_name", None)
|
||||||
|
@ -69,7 +69,7 @@ class Dashboard(View):
|
||||||
):
|
):
|
||||||
data["current_version"] = settings.VERSION
|
data["current_version"] = settings.VERSION
|
||||||
data["available_version"] = available_version
|
data["available_version"] = available_version
|
||||||
except ConnectorException:
|
except: # pylint: disable= bare-except
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return TemplateResponse(request, "settings/dashboard/dashboard.html", data)
|
return TemplateResponse(request, "settings/dashboard/dashboard.html", data)
|
||||||
|
|
Loading…
Reference in a new issue