bix a bug: correct the sended parameter 'no need for id in the string parameter name' tls-sprint
authorGraziella Toutoungis <graziella.toutoungis@logilab.fr>
Thu, 07 May 2009 16:00:58 +0200
branchtls-sprint
changeset 1713 d817f23439ba
parent 1712 32ab85031814
child 1715 cba9f175da2d
bix a bug: correct the sended parameter 'no need for id in the string parameter name'
web/data/cubicweb.edition.js
web/views/basecontrollers.py
--- a/web/data/cubicweb.edition.js	Thu May 07 12:46:35 2009 +0200
+++ b/web/data/cubicweb.edition.js	Thu May 07 16:00:58 2009 +0200
@@ -166,12 +166,14 @@
     if (comboId) {
 	// re-insert option in combobox if it was taken from there
 	var selectNode = getNode(comboId);
+        // XXX what on object relation
 	if (selectNode){
 	   var options = selectNode.options;
 	   var node_id = elementId.substring(0, elementId.indexOf(':'));
 	   options[options.length] = OPTION({'id' : elementId, 'value' : node_id}, entityView);
 	}
     }
+    elementId = elementId.substring(2, elementId.length);
     remoteExec('remove_pending_insert', elementId.split(':'));
 }
 
--- a/web/views/basecontrollers.py	Thu May 07 12:46:35 2009 +0200
+++ b/web/views/basecontrollers.py	Thu May 07 16:00:58 2009 +0200
@@ -495,13 +495,9 @@
 
     def _remove_pending(self, eidfrom, rel, eidto, kind):
         key = 'pending_%s' % kind
-        try:
-            pendings = self.req.get_session_data(key)
-            pendings.remove( (typed_eid(eidfrom), rel, typed_eid(eidto)) )
-        except:
-            self.exception('while removing pending eids')
-        else:
-            self.req.set_session_data(key, pendings)
+        pendings = self.req.get_session_data(key)
+        pendings.remove( (typed_eid(eidfrom), rel, typed_eid(eidto)) )
+        self.req.set_session_data(key, pendings)
 
     def js_remove_pending_insert(self, (eidfrom, rel, eidto)):
         self._remove_pending(eidfrom, rel, eidto, 'insert')