校正性别

This commit is contained in:
曹前明 2022-10-22 23:48:13 +08:00
parent 08d1faf97e
commit 63bd3286c6
1 changed files with 1 additions and 1 deletions

View File

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