fix: template兼容无editable字段的CRUD定义,editable.binds访问前先检查editable存在性

This commit is contained in:
Hermes Agent 2026-06-24 17:53:29 +08:00
parent 981da3d1e5
commit a55654674a

View File

@ -43,7 +43,7 @@ data_browser_tmpl = """
{% else %}
"update_data_url":{%- raw -%}"{{entire_url('update_{%- endraw -%}{{summary[0].name}}{%- raw -%}.dspy')}}"{%- endraw %}
{% endif %}
{% if editable.binds %}
{% if editable and editable.binds %}
,"binds":{{json.dumps(editable.binds, indent=4, ensure_ascii=False)}}
{% endif %}
},