修改线上null

This commit is contained in:
shenjian@fangjia.com
2023-03-09 15:22:37 +08:00
parent 25d046cc6e
commit 9e7d8d1743
+1 -2
View File
@@ -24,10 +24,9 @@ def find_around_price(city_now, lng, lat):
"""
if pd.isna(lng):
return None
filter_query = []
filter_query = [{"terms": {"tag": ["美食;中餐厅", "美食;外国餐厅"]}}]
if pd.notna(city_now):
filter_query.append({"term": {"city": {"value": city_now}}})
filter_query.append({"terms": {"tag": ["美食;中餐厅", "美食;外国餐厅"]}})
filter_query.append({"range": {"price": {"gte": 10, "lte": 300}}})
filter_query.append({"geo_distance": {"distance": 1000, "location": [lng, lat]}})