web/views/editforms.py
branchstable
changeset 3534 81cfec545e1b
parent 3532 df045bc51d00
child 3536 f6c9a5df80fb
child 3586 52b00c5e441a
--- a/web/views/editforms.py	Wed Sep 30 17:32:29 2009 +0200
+++ b/web/views/editforms.py	Wed Sep 30 17:56:53 2009 +0200
@@ -504,9 +504,10 @@
     def add_hiddens(self, form, entity):
         """to ease overriding (see cubes.vcsfile.views.forms for instance)"""
         iid = 'rel-%s-%s-%s' % (self.peid, self.rtype, entity.eid)
-        form.form_add_hidden(name=self.rtype, value=self.peid,
-                             # role is the for parent entity, we want the role
-                             # of the inlined entity
+        #  * str(self.rtype) in case it's a schema object 
+        #  * neged_role() since role is the for parent entity, we want the role
+        #    of the inlined entity
+        form.form_add_hidden(name=str(self.rtype), value=self.peid,
                              role=neg_role(self.role), eidparam=True, id=iid)
 
     def keep_entity(self, form, entity):