Fix master template bug when no form in context

This commit is contained in:
Lance Edgar 2024-04-16 21:13:53 -05:00
parent 5a7deadba2
commit e7b8b6e818

View file

@ -6,9 +6,11 @@
<script type="text/javascript">
## declare extra data needed by form
% if form is not Undefined:
% for key, value in form.json_data.items():
${form.component_studly}Data.${key} = ${json.dumps(value)|n}
% endfor
% endif
% if master.deletable and instance_deletable and master.has_perm('delete') and master.delete_confirm == 'simple':
@ -21,7 +23,9 @@
% endif
</script>
% if form is not Undefined:
${form.render_included_templates()}
% endif
</%def>