# Friday, December 16, 2016¶

I fixed a bug which I introduced on Wednesday, November 23, 2016 and which caused the insert window to be read-only in certain cases. More precisely the insert window of tables which had no separate insert_layout, i.e. which use their detail_layout for both detail window and insert window.

The bug was in lino.modlib.extjs.ext_renderer:

if dh.layout._formpanel_name.endswith('.InsertFormPanel'):
yield "  default_record_id: -99999,"


This test was in js_render_FormPanelSubclass(), which was one step too early. It is now in js_render_detail_action_FormPanel() where it looks at the action, and not at the name of the panel:

if isinstance(action.action, InsertRow):
yield "  default_record_id: -99999,"