fix: 修复标签页description为空时的TypeError
问题: - 当selected_tag.description为None时,尝试与字符串相加导致TypeError - 造成标签页访问时出现502错误 修复: - 在index_new.html第8行添加or默认值处理 - 确保description为None时使用默认文案 测试: - 本地验证标签页正常显示 - 修复v2.5部署502问题 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
{% block extra_head %}
|
||||
<!-- v2.4新增: 标签页SEO优化 -->
|
||||
{% if selected_tag %}
|
||||
<meta name="description" content="{{ selected_tag.seo_description or (selected_tag.description + ' - 发现最好用的' + selected_tag.name + '工具') }}">
|
||||
<meta name="description" content="{{ selected_tag.seo_description or ((selected_tag.description or '发现最好用的' + selected_tag.name + '工具') + ' - ZJPB AI工具导航') }}">
|
||||
<meta name="keywords" content="{{ selected_tag.seo_keywords or (selected_tag.name + ',AI工具,自己品吧,ZJPB') }}">
|
||||
<link rel="canonical" href="{{ request.url }}">
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user