- updated with Thierrys patch which handles conflicting email addresses between peers
[plcapi.git] / PLC / Methods / UpdateNodeNetwork.py
index 149c541..dc1e65a 100644 (file)
@@ -6,7 +6,7 @@ from PLC.NodeNetworks import NodeNetwork, NodeNetworks
 from PLC.Auth import Auth
 
 can_update = lambda (field, value): field not in \
-             ['nodenetwork_id']
+             ['nodenetwork_id','node_id']
 
 class UpdateNodeNetwork(Method):
     """
@@ -62,4 +62,8 @@ class UpdateNodeNetwork(Method):
        nodenetwork.update(nodenetwork_fields)
         nodenetwork.sync()
        
+       self.event_objects = {'NodeNetwork': [nodenetwork['nodenetwork_id']]}
+       self.message = "Node network %d updated: %s " % \
+           (nodenetwork['nodenetwork_id'], ", ".join(nodenetwork_fields.keys()))
+
         return 1