2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00

Have attribute set return some data

Handle html form arrays with blanks, removing blank values
(more complex usage requires JSON)
This commit is contained in:
Jarrod Johnson 2013-11-13 14:52:32 -05:00
parent ecc7c21fc4
commit 5e406d6fa1
2 changed files with 3 additions and 1 deletions

View File

@ -59,7 +59,8 @@ def _get_query_dict(env, reqbody, reqtype):
pbody = urlparse.parse_qs(reqbody, True)
for ky in pbody.iterkeys():
if len(pbody[ky]) > 1: # e.g. REST explorer
qdict[ky] = pbody[ky]
na = [i for i in pbody[ky] if i != '']
qdict[ky] = na
else:
qdict[ky] = pbody[ky][0]
if 'restexplorerhonorkey' in qdict:

View File

@ -41,3 +41,4 @@ def update(nodes, element, configmanager, inputdata):
if updatenode:
updatedict[node] = updatenode
configmanager.set_node_attributes(updatedict)
return retrieve(nodes, element, configmanager, inputdata)