edit controller now informs server side about its main eid through transaction data stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 27 Nov 2009 09:10:40 +0100
branchstable
changeset 3921 4f24b6ef3da9
parent 3920 366b30a6f9f6
child 3922 69020a7c234a
edit controller now informs server side about its main eid through transaction data
web/views/editcontroller.py
--- a/web/views/editcontroller.py	Fri Nov 27 09:09:14 2009 +0100
+++ b/web/views/editcontroller.py	Fri Nov 27 09:10:40 2009 +0100
@@ -43,6 +43,10 @@
     def _default_publish(self):
         req = self.req
         form = req.form
+        # so we're able to know the main entity from the repository side
+        if '__maineid' in form:
+            req.set_shared_data('__maineid', typed_eid(form['__maineid']),
+                                querydata=True)
         # no specific action, generic edition
         self._to_create = req.data['eidmap'] = {}
         self._pending_relations = []