fix: 修复代码生成字段唯一性校验dao层模板判断异常的问题
This commit is contained in:
@@ -70,7 +70,7 @@ class {{ BusinessName }}Dao:
|
||||
await db.execute(
|
||||
select({{ ClassName }}).where(
|
||||
{% for column in columns %}
|
||||
{% if column.required %}
|
||||
{% if column.unique %}
|
||||
{{ ClassName }}.{{ column.python_field | camel_to_snake }} == {{ businessName }}.{{ column.python_field | camel_to_snake }} if {{ businessName }}.{{ column.python_field | camel_to_snake }} else True,
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user