Skip to content

Commit

Permalink
added hdx search option
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Dec 19, 2023
1 parent b8337ff commit 1c6b026
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,14 +618,14 @@ def request_geonames(request):
keyword = request.GET.get("q")
response = {"totalResultsCount": 0, "geonames": []}
if not (
str(keyword).lower().startswith("boundary")
str(keyword).lower().startswith("hdx")
or str(keyword).lower().startswith("osm")
or str(keyword).lower().startswith("tm")
):
response = requests.get(geonames_url, params=payload).json()
assert isinstance(response, dict)
if RAW_DATA_API_URL:
if str(keyword).lower().startswith("boundary"):
if str(keyword).lower().startswith("hdx"):
lst = keyword.split(" ")
if len(lst) > 1:
keyword = lst[1]
Expand Down

0 comments on commit 1c6b026

Please sign in to comment.