# HG changeset patch # User Sylvain Thénault # Date 1254326213 -7200 # Node ID 81cfec545e1b3949e6250127905938603c3b4299 # Parent 88ceed15a3d3882c6d54527604abf103bc291c9a ensure str is given as field's name diff -r 88ceed15a3d3 -r 81cfec545e1b web/views/editforms.py --- 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):