Skip to content

Commit b8337ff

Browse files
Fix dataset not showing up error
1 parent 451459b commit b8337ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ def request_geonames(request):
623623
or str(keyword).lower().startswith("tm")
624624
):
625625
response = requests.get(geonames_url, params=payload).json()
626-
print(response)
627626
assert isinstance(response, dict)
628627
if RAW_DATA_API_URL:
629628
if str(keyword).lower().startswith("boundary"):
@@ -646,7 +645,7 @@ def request_geonames(request):
646645
}
647646
add_resp = {
648647
"bbox": geojson,
649-
"adminName2": feature["properties"]["iso_3"],
648+
"adminName2": f'ISO3 : {feature["properties"]["iso_3"]}',
650649
"name": f'{request.GET.get("q")} -> {feature["properties"]["description"]}',
651650
"countryName": feature["properties"][
652651
"dataset_name"
@@ -656,6 +655,7 @@ def request_geonames(request):
656655

657656
if "geonames" in response:
658657
response["geonames"].append(add_resp)
658+
response["totalResultsCount"] += 1
659659

660660
if str(keyword).lower().startswith("osm"):
661661
lst = keyword.split(" ")

ui/app/components/aoi/ExportAOI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export class ExportAOI extends Component {
137137

138138
handleSearch = result => {
139139
var geojson;
140-
if (result.adminName2.startsWith('HOTOSM')){
140+
if (result.adminName2.startsWith('ISO3')){
141141
try {
142142
geojson = JSON.parse(JSON.stringify(result.bbox));
143143
} catch (e) {

0 commit comments

Comments
 (0)