From cc92e5e29a203e78ec02fb03d8b2aa510be57951 Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Fri, 14 Jul 2023 08:32:20 +0800 Subject: [PATCH] admin_service.py: non-programmers probably do not know int. So, use integer instead. --- app/admin_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin_service.py b/app/admin_service.py index bd529a9..7f41dd5 100644 --- a/app/admin_service.py +++ b/app/admin_service.py @@ -65,7 +65,7 @@ def article(): _page_size = min(max(1, int(request.args.get("size", 5))), _article_number) # 最小的size是1 _cur_page = min(max(1, int(request.args.get("page", 1))), _article_number // _page_size + (_article_number % _page_size > 0)) # 最小的page是1 except ValueError: - return "page parameters must be int!" + return "page parameters must be integer!" _articles = get_page_articles(_cur_page, _page_size) _make_title_and_content(_articles) @@ -83,7 +83,7 @@ def article(): try: delete_id = int(request.args.get("delete_id", 0)) except: - return "Delete article ID must be int!" + return "Delete article ID must be integer!" if delete_id: # delete article delete_article_by_id(delete_id) _update_context()