Update frappe/geo/utils.py

Co-authored-by: Prssanna Desai <prssud@gmail.com>
This commit is contained in:
Mathieu Brunot 2020-11-26 02:26:57 +01:00 committed by GitHub
parent a086923469
commit 90875ef21c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,8 @@ def merge_location_features_in_one(coords):
geojson_dict = []
for element in coords:
geojson_loc = frappe.parse_json(element['location'])
if not geojson_loc:
continue
for coord in geojson_loc['features']:
coord['properties']['name'] = element['name']
geojson_dict.append(coord.copy())