Fixed a bug that prevented pk from being transmitted for newly saved objects
Change-Id: Idd4ce42116c907fb193fd3d132baf64311b8762d
diff --git a/xos/core/models/plcorebase.py b/xos/core/models/plcorebase.py
index f671cde..dd1857d 100644
--- a/xos/core/models/plcorebase.py
+++ b/xos/core/models/plcorebase.py
@@ -292,6 +292,10 @@
except:
changed_fields.append('__lookup_error')
+
+
+ super(PlCoreBase, self).save(*args, **kwargs)
+
try:
r = redis.Redis("redis")
payload = json.dumps({'pk':self.pk,'changed_fields':changed_fields})
@@ -300,8 +304,6 @@
# Redis not running.
pass
- super(PlCoreBase, self).save(*args, **kwargs)
-
# This is a no-op if observer_disabled is set
# if not silent:
# notify_observer()