From 63bd3286c6b22ee22746220709507c15216c2b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Sat, 22 Oct 2022 23:48:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E6=AD=A3=E6=80=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/utils/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/utils/tools.py b/apps/utils/tools.py index c8cfbda6..8e23b632 100755 --- a/apps/utils/tools.py +++ b/apps/utils/tools.py @@ -118,7 +118,7 @@ def get_info_from_id(val): age = datetime.now().year - int(birth_year) sex = int(val[-2]) gender = '女' - if sex/2: + if sex % 2: gender = '男' return dict(age=age, gender=gender)