소스 검색

mvp: 修改城市处理逻辑

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 5 년 전
부모
커밋
f5441fe4a6
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      entity.py
  2. 2 0
      mvp.py

+ 2 - 0
entity.py

@@ -4,6 +4,8 @@ class PeopleInfo:
    """
 
     def __init__(self, uuid, city=None, age=None, sex=None, crowd=None):
+        if crowd is None:
+            crowd = []
         self.uuid = uuid
         if city == '上海市' or city == '一线':
             self.city = '上海市'

+ 2 - 0
mvp.py

@@ -248,6 +248,8 @@ class Mvp:
         for people in people_info_city:
             uuid = people[0]
             city = people[1]
+            if city:
+                city = str(city).split('市')[0] + '市'
             nld = people[2]
             sex = people[3]
             sub_option_ids = people[4]