Various bug fixes
diff --git a/xos/core/models/__init__.py b/xos/core/models/__init__.py
index 2ee6b94..6fad0f1 100644
--- a/xos/core/models/__init__.py
+++ b/xos/core/models/__init__.py
@@ -5,7 +5,7 @@
from .service import ServiceAttribute, TenantAttribute, ServiceRole
from .tag import Tag
from .role import Role
-from .site import Site, Deployment, DeploymentRole, DeploymentPrivilege, Controller, ControllerRole, ControllerSite, SiteDeployment
+from .site import Site, Deployment, DeploymentRole, DeploymentPrivilege, Controller, ControllerRole, ControllerSite, SiteDeployment,Diag
from .dashboard import DashboardView, ControllerDashboardView
from .user import User, UserDashboardView
from .serviceclass import ServiceClass
diff --git a/xos/core/models/site.py b/xos/core/models/site.py
index 55f4945..77b96ac 100644
--- a/xos/core/models/site.py
+++ b/xos/core/models/site.py
@@ -324,3 +324,7 @@
@property
def enacted(self):
return None
+
+ @enacted.setter
+ def enacted(self, value):
+ pass # Ignore sets, Diag objects are always pending.
diff --git a/xos/core/views/observer.py b/xos/core/views/observer.py
index 249c09f..77f1d1b 100644
--- a/xos/core/views/observer.py
+++ b/xos/core/views/observer.py
@@ -6,7 +6,12 @@
import time
def Observer(request):
- diag = Diag.objects.filter(name=Config().observer_name).first()
+ try:
+ observer_name = Config().observer_name
+ except AttributeError:
+ observer_name = ''
+
+ diag = Diag.objects.filter(name=observer_name).first()
if not diag:
return HttpResponse(json.dumps({"health": ":-X", "time": time.time(), "comp": 0}))