Skip to content

Commit 7b5ae46

Browse files
authored
Fix the code generation schema template (#706)
1 parent 54ea301 commit 7b5ae46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/plugin/code_generator/templates/python/schema.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ from backend.common.schema import SchemaBase
1010
class {{ schema_name }}SchemaBase(SchemaBase):
1111
"""{{ doc_comment }}基础模型"""
1212
{% for model in models %}
13-
{{ model.name }}: {% if model.nullable %}{{ model.pd_type }} | None = Field(None, description='{{ model.comment }}'){% else %}{{ model.pd_type }} = Field(description='{{ model.comment }}'){% endif %}
13+
{{ model.name }}: {% if model.is_nullable %}{{ model.pd_type }} | None = Field(None, description='{{ model.comment }}'){% else %}{{ model.pd_type }} = Field(description='{{ model.comment }}'){% endif %}
1414

1515
{% endfor %}
1616

0 commit comments

Comments
 (0)