fixes transcoding issue for nodes - local nodes were transcoded to None
[plcapi.git] / PLC / Methods / AddNode.py
index 17f0bff..e355dca 100644 (file)
@@ -33,6 +33,8 @@ class AddNode(Method):
 
     returns = Parameter(int, 'New node_id (> 0) if successful')
 
+    object_type = 'Node'
+
 
     def call(self, auth, site_id_or_login_base, node_fields):
         node_fields = dict(filter(can_update, node_fields.items()))
@@ -61,5 +63,6 @@ class AddNode(Method):
         node.sync()
 
        self.object_ids = [site['site_id'], node['node_id']]    
+       self.message = "Node %s created" % node['node_id']
 
         return node['node_id']