Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Enero committed Oct 13, 2020
1 parent ea6e79d commit 44b2030
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions nabweatherd/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ def get(self, request, *args, **kwargs):
list_places = client.search_places(search_location)
for one_place in list_places:
# correct bad json returned my MeteoFrance
<<<<<<< HEAD
one_place.raw_data['name'] = one_place.raw_data['name'].replace("'", " ")
one_place.raw_data['admin'] = one_place.raw_data['admin'].replace("'", " ")
=======
if ('name' in one_place.raw_data):
one_place.raw_data['name'] = one_place.raw_data['name'].replace("'", " ")
if ('admin' in one_place.raw_data):
one_place.raw_data['admin'] = one_place.raw_data['admin'].replace("'", " ")
>>>>>>> releng
json_item['value'] = str(one_place.raw_data)
json_item['text'] = one_place.__str__()
json_places.append(json_item)
Expand Down

0 comments on commit 44b2030

Please sign in to comment.