Python formatting

This commit is contained in:
Mouse Reeve 2022-02-17 16:28:55 -08:00
parent 9132c054f2
commit 3869f0cc1a
2 changed files with 4 additions and 2 deletions

View file

@ -13,7 +13,7 @@ VERSION = "0.3.0"
RELEASE_API = env(
"RELEASE_API",
"https://api.github.com/repos/bookwyrm-social/bookwyrm/releases/latest"
"https://api.github.com/repos/bookwyrm-social/bookwyrm/releases/latest",
)
PAGE_LENGTH = env("PAGE_LENGTH", 15)

View file

@ -115,7 +115,9 @@ class Dashboard(View):
try:
release = get_data(settings.RELEASE_API, timeout=3)
available_version = release.get("tag_name", None)
if available_version and version.parse(available_version) > version.parse(settings.VERSION):
if available_version and version.parse(available_version) > version.parse(
settings.VERSION
):
data["current_version"] = settings.VERSION
data["available_version"] = available_version
except ConnectorException: