diff --git a/singletree.py b/singletree.py index e4d0660..33a9ac6 100644 --- a/singletree.py +++ b/singletree.py @@ -55,8 +55,11 @@ ui_tmpl = """ "parentField":"{{parentField}}", "idField":"{{idField}}", "textField":"{{textField}}", +{% if dataparams %} + "dataparams": {{json.dumps(dataparams)}}, +{% endif %} {% if get_data_url %} - "dataurl": "{{get_data_url}}" + "dataurl": "{{get_data_url}}", {% else %} "dataurl":{%- raw -%}"{{entire_url('./get_{%- endraw -%}{{tblname}}{%- raw -%}.dspy')}}"{%- endraw %} {% endif %} diff --git a/xls2crud.py b/xls2crud.py index 7b6ded3..8dc5052 100644 --- a/xls2crud.py +++ b/xls2crud.py @@ -40,7 +40,7 @@ def subtable2toolbar(desc): desc.toolbar = DictObject(**{ "tools":[] }) - tools = desc.toolbar.tools + tools = desc.toolbar.tools or [] binds = desc.binds or [] for st in desc.subtables: tools.append({