From 40decff03532fd794adc05f61c0239ba543683ba Mon Sep 17 00:00:00 2001 From: xqyjlj Date: Sat, 13 Dec 2025 23:57:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8Dcmx-ip?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8Bint=E5=8F=98=E6=88=90float?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xqyjlj --- resources/templates/filter.py.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/templates/filter.py.j2 b/resources/templates/filter.py.j2 index b6c72c7d..d0bffeb5 100644 --- a/resources/templates/filter.py.j2 +++ b/resources/templates/filter.py.j2 @@ -89,7 +89,13 @@ def {{ name }}( instance: str = "{{ CSP.instance }}", default: {{ format_type(item.type) }} = {{ format_value(item.default) }}, ) -> {{ format_type(item.type) }}: + {%- if item.type == "int" %} + return int(project.configs.get({{ item.path }}, default)) + {%- elif item.type == "bool" %} + return bool(project.configs.get({{ item.path }}, default)) + {%- else %} return project.configs.get({{ item.path }}, default) + {%- endif %} {# #} {%- endfor -%}