git://git.onelab.eu
/
myslice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed update when params is an array
[myslice.git]
/
rest
/
update.py
diff --git
a/rest/update.py
b/rest/update.py
index
f81c63e
..
cb11668
100644
(file)
--- a/
rest/update.py
+++ b/
rest/update.py
@@
-36,7
+36,14
@@
def dispatch(request, object_type, object_name):
print "#======> 1 ", el[1]
#o.params = req_items.getlist('params[]')
#o.params.append({el[0]:el[1]})
print "#======> 1 ", el[1]
#o.params = req_items.getlist('params[]')
#o.params.append({el[0]:el[1]})
- o.params.append({el[0][7:-1]:el[1]})
+
+ #params[key][]
+ if (el[0][-2:-1] == '[]') :
+ o.params.append({el[0][7:-3]:",".join(el[1])})
+ else :
+ #params[key]
+ o.params.append({el[0][7:-1]:el[1]})
+
print "o.params = ",o.params
elif el[0].startswith('fields'):
print "o.params = ",o.params
elif el[0].startswith('fields'):