Copy backend_register from ControllerSlice to Slice
diff --git a/xos/model_policies/model_policy_ControllerSlice.py b/xos/model_policies/model_policy_ControllerSlice.py
index 1861c66..bfe7995 100644
--- a/xos/model_policies/model_policy_ControllerSlice.py
+++ b/xos/model_policies/model_policy_ControllerSlice.py
@@ -8,9 +8,18 @@
except:
his_status_code = 0
+ fields = []
if (my_status_code not in [0,his_status_code]):
controller_slice.slice.backend_status = controller_slice.backend_status
- controller_slice.slice.save(update_fields = ['backend_status'])
+ fields+=['backend_status']
+
+ if (controller_slice.backend_register != controller_slice.slice.backend_register):
+ controller_slice.slice.backend_register = controller_slice.backend_register
+ fields+=['backend_register']
+
+ controller_slice.slice.save(update_fields = fields)
+
+
except Exception,e:
print str(e)
pass