Going green with empty requests that leads to 404 responses
This commit is contained in:
parent
850dc09a4f
commit
3583cc6f47
@ -60,7 +60,10 @@ class MapboxGeocoder(Traceable):
|
||||
@qps_retry(qps=10)
|
||||
def geocode(self, searchtext, city=None, state_province=None,
|
||||
country=None):
|
||||
address = [searchtext]
|
||||
if not searchtext:
|
||||
return []
|
||||
else:
|
||||
address = [searchtext]
|
||||
if city:
|
||||
address.append(city)
|
||||
if state_province:
|
||||
|
Loading…
Reference in New Issue
Block a user