resource reservation work in progress
[unfold.git] / rest / update.py
index e7b671a..b1a8875 100644 (file)
@@ -18,30 +18,30 @@ def dispatch(request, object_type, object_name):
     
     o = ObjectRequest(request, object_type, object_name)    
     
-    object_filters = {}
-    object_params = {}
-    result = {}
-    
     if request.method == 'POST':
         req_items = request.POST
     elif request.method == 'GET':
         #return error('only post request is supported')
         req_items = request.GET
-    print req_items
     for el in req_items.items():
+        
+        print "#===============>",o.params
         if el[0].startswith('filters'):
             o.filters[el[0][8:-1]] = el[1]
-            print o.filters
         elif el[0].startswith('params'):
-            o.params[el[0][7:-1]] = el[1]
-            print o.params
+            print "#======>", el[0]
+            print "#======>", el[0][7:8]
+            print "#======>", el[0][10:-1]
+            print "#======>", el[1]
+            o.params.append({ el[0][10:-1] : el[1] })
+            
+            
         elif el[0].startswith('fields'):
             o.fields=req_items.getlist('fields[]')
         elif el[0].startswith('options'):
             o.options = req_items.getlist('options[]')
-
+    
     try:
-        print o.params
         response = o.update()
 
         if response :