From 7a578e5e83a5e99750f7a0bd02b4b24217ad0d00 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 7 Oct 2020 19:19:25 +0200 Subject: [PATCH] admin: dont show check when outpost hasnt connected closes #263 --- .../admin/templates/administration/outpost/list.html | 10 ++++------ passbook/outposts/models.py | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/passbook/admin/templates/administration/outpost/list.html b/passbook/admin/templates/administration/outpost/list.html index 8b3b54d3b..6fb976943 100644 --- a/passbook/admin/templates/administration/outpost/list.html +++ b/passbook/admin/templates/administration/outpost/list.html @@ -60,12 +60,10 @@ {% with ver=outpost.deployment_version %} - {% if ver.outdated %} - {% if ver.version == "" %} - - - {% else %} - {% blocktrans with is=ver.version should=ver.should %}{{ is }}, should be {{ should }}{% endblocktrans %} - {% endif %} + {% if not ver.version %} + + {% elif ver.outdated %} + {% blocktrans with is=ver.version should=ver.should %}{{ is }}, should be {{ should }}{% endblocktrans %} {% else %} {{ ver.version }} {% endif %} diff --git a/passbook/outposts/models.py b/passbook/outposts/models.py index 2ec2147f7..90a3df308 100644 --- a/passbook/outposts/models.py +++ b/passbook/outposts/models.py @@ -119,7 +119,7 @@ class Outpost(models.Model): key = self.state_cache_prefix("version") value = cache.get(key, None) if not value: - return {"version": "", "outdated": False, "should": OUR_VERSION} + return {"version": None, "outdated": False, "should": OUR_VERSION} try: outpost_version = parse(value) return {