git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- make Add() calling convention consistent among all functions that
[plcapi.git]
/
PLC
/
Methods
/
UpdateNode.py
diff --git
a/PLC/Methods/UpdateNode.py
b/PLC/Methods/UpdateNode.py
index
c8be8db
..
3566a42
100644
(file)
--- a/
PLC/Methods/UpdateNode.py
+++ b/
PLC/Methods/UpdateNode.py
@@
-21,13
+21,15
@@
class UpdateNode(Method):
roles = ['admin', 'pi', 'tech']
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']),
accepts = [
PasswordAuth(),
Mixed(Node.fields['node_id'],
Node.fields['hostname']),
-
updat
e_fields
+
nod
e_fields
]
returns = Parameter(int, '1 if successful')
]
returns = Parameter(int, '1 if successful')