diff --git a/frontend/templates/account_detail.html b/frontend/templates/account_detail.html
index 5229bd6..b3e2f7a 100644
--- a/frontend/templates/account_detail.html
+++ b/frontend/templates/account_detail.html
@@ -155,7 +155,7 @@
‹ 上一页
{% endif %}
- {% for i in range(max(1, p - 2), min(tp, p + 2) + 1) %}
+ {% for i in range([1, p - 2]|max, [tp, p + 2]|min + 1) %}
{% if i == p %}{{ i }}
{% else %}{{ i }}{% endif %}
{% endfor %}
diff --git a/frontend/templates/dashboard.html b/frontend/templates/dashboard.html
index 24ef5aa..32c24ca 100644
--- a/frontend/templates/dashboard.html
+++ b/frontend/templates/dashboard.html
@@ -148,7 +148,7 @@
‹ 上一页
{% endif %}
- {% for i in range(max(1, p - 2), min(tp, p + 2) + 1) %}
+ {% for i in range([1, p - 2]|max, [tp, p + 2]|min + 1) %}
{% if i == p %}{{ i }}
{% else %}{{ i }}{% endif %}
{% endfor %}