diff --git a/dags/business/business/community/other.py b/dags/business/business/community/other.py index c16dcd6..07937ec 100644 --- a/dags/business/business/community/other.py +++ b/dags/business/business/community/other.py @@ -19,7 +19,7 @@ count = 0 def deal(actions, x): global count doc_info = dict() - if pd.notna(x['avg_price']) and pd.notna(x['rent_price']): + if 'rent_price' in x and pd.notna(x['avg_price']) and pd.notna(x['rent_price']): doc_info['sell_to_rent'] = int(x['avg_price'] / x['rent_price']) if pd.notna(x['household_count']): doc_info['person_num'] = int(x['household_count'] * 2.3)