1
0
Fork 0

admin_service.py: non-programmers probably do not know int. So, use integer instead.

Bug511-Bosh
Lan Hui 2023-07-14 08:32:20 +08:00
parent cd562a745c
commit cc92e5e29a
1 changed files with 2 additions and 2 deletions

View File

@ -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()