- make Add() calling convention consistent among all functions that
[plcapi.git] / PLC / Methods / UpdateNode.py
index c8be8db..3566a42 100644 (file)
@@ -21,13 +21,15 @@ class UpdateNode(Method):
 
     roles = ['admin', 'pi', 'tech']
 
-    update_fields = dict(filter(can_update, Node.fields.items()))
+    node_fields = dict(filter(can_update, Node.fields.items()))
+    for field in node_fields.values():
+        field.optional = True
 
     accepts = [
         PasswordAuth(),
         Mixed(Node.fields['node_id'],
               Node.fields['hostname']),
-        update_fields
+        node_fields
         ]
 
     returns = Parameter(int, '1 if successful')