fix icon colors in developer view
diff --git a/planetstack/core/xoslib/objects/plus.py b/planetstack/core/xoslib/objects/plus.py
index 5f2e2f3..01cb8d7 100644
--- a/planetstack/core/xoslib/objects/plus.py
+++ b/planetstack/core/xoslib/objects/plus.py
@@ -6,10 +6,10 @@
class PlusObjectMixin:
def getBackendIcon(self):
- if (self.enacted is not None) and self.enacted >= self.updated:
+ if (self.enacted is not None) and self.enacted >= self.updated or self.backend_status.startswith("1 -"):
return "/static/admin/img/icon_success.gif"
else:
- if self.backend_status == "Provisioning in progress" or self.backend_status=="":
+ if ((self.backend_status is not None) and self.backend_status.startswith("0 -")) or self.backend_status == "Provisioning in progress" or self.backend_status=="":
return "/static/admin/img/icon_clock.gif"
else:
return "/static/admin/img/icon_error.gif"
@@ -20,3 +20,4 @@
else:
return '<span title="%s"><img src="%s"></span>' % (self.backend_status, self.getBackendIcon())
+