From e3e3ebc981c8c223d024d4aa6d6a24775996a107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Thu, 5 Jun 2025 17:31:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/company/company/fill_company_comm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dags/company/company/fill_company_comm.py b/dags/company/company/fill_company_comm.py index 35e0bd0..2f4d999 100644 --- a/dags/company/company/fill_company_comm.py +++ b/dags/company/company/fill_company_comm.py @@ -15,7 +15,7 @@ def sync(province): else: company_ids = list() shape_df = DIDATA_DEV_ELASTIC_CLIENT.scan_by_sql_to_data_frame(f"select city_name, area_name, street_name, name, shape from community where province_name='{province}'") - if len(shape_df) == 0 or len(shape_df[shape_df['shape']]) == 0: + if len(shape_df) == 0 or 'shape' not in shape_df.columns or len(shape_df[shape_df['shape']]) == 0: log.info(f"{province}无围栏数据") return actions = list()