优化报错
This commit is contained in:
@@ -14,6 +14,9 @@ index_name = "community_summary"
|
|||||||
|
|
||||||
|
|
||||||
def save(community_summary_df):
|
def save(community_summary_df):
|
||||||
|
if 'estate_charge' not in community_summary_df.columns:
|
||||||
|
log.info("该城市无补充物业费")
|
||||||
|
return
|
||||||
df = community_summary_df[['_id', 'city', 'estate_charge']]
|
df = community_summary_df[['_id', 'city', 'estate_charge']]
|
||||||
df = df.dropna(subset=['estate_charge'])
|
df = df.dropna(subset=['estate_charge'])
|
||||||
actions = list()
|
actions = list()
|
||||||
@@ -122,8 +125,13 @@ def sync_by_city(city_now):
|
|||||||
|
|
||||||
def sync(city=None):
|
def sync(city=None):
|
||||||
if pd.isna(city):
|
if pd.isna(city):
|
||||||
|
flag = False
|
||||||
for city_now in areautils.get_all_cities():
|
for city_now in areautils.get_all_cities():
|
||||||
sync_by_city(city_now)
|
# 暂时flag标识继续执行后面的补充!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
if city_now == '定安':
|
||||||
|
flag = True
|
||||||
|
if flag is True:
|
||||||
|
sync_by_city(city_now)
|
||||||
else:
|
else:
|
||||||
sync_by_city(city)
|
sync_by_city(city)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user