cubicweb #1534802 crash when using display_fields [resolved]

I need to customize a bit an edition form, and used:

form = self._cw.vreg['forms'].select('edition', self._cw, entity=self.newentity,
                                     submitmsg=self.submited_message(),
                                            # XXX does not work  either: same pb as  above
                                            # (AttributeError("'str' object has no attribute 'final'",)
                                     display_fields=[('name', 'subject'),
                                                     ('description', 'subject'),
                                                     ('time_dictionary', 'subject')])

This caused the following exception a bit later:

2011-03-09 10:17:29 - (cubicweb.web) ERROR: AttributeError("'str' object has no attribute 'final'",)
Traceback (most recent call last):
 File "/home/alf/cubicweb/cubicweb/web/application.py", line 348, in main_publish
   result = controller.publish(rset=rset)
 File "/home/alf/cubicweb/cubicweb/web/views/basecontrollers.py", line 124, in publish
   rset=rset, view=view)
 File "/home/alf/cubicweb/cubicweb/cwvreg.py", line 383, in main_template
   res = obj.render(**kwargs)
 File "/home/alf/cubicweb/cubicweb/view.py", line 176, in render
   view_func(**context)
 File "/home/alf/cubicweb/cubicweb/web/views/basetemplates.py", line 142, in call
   view.render(w=w)
 File "/home/alf/cubicweb/cubicweb/view.py", line 176, in render
   view_func(**context)
 File "/home/alf/cubicweb/cubicweb/view.py", line 380, in call
   super(EntityView, self).call(**kwargs)
 File "/home/alf/cubicweb/cubicweb/view.py", line 228, in call
   self.cell_call(row=0, **kwargs)
 File "/home/alf/cubicweb/cubicweb/web/views/editforms.py", line 107, in cell_call
   self.render_form(entity)
 File "/home/alf/cubicweb/cubes/pagode/views/run.py", line 130, in render_form
   self.init_form(form, self.newentity)
 File "/home/alf/cubicweb/cubicweb/web/views/editforms.py", line 210, in init_form
   if not rschema.final:
AttributeError: 'str' object has no attribute 'final'

The value of rschema at that point is 'name' (from the display_fields list), which is returned unchanged by AutomaticEntityForm.editable_attributes if it is not None.

priorityimportant
typebug
done in3.12.1
load left0.000
closed by#b07ee816bffb fix editable_attributes bug (closes #1534802)