safeguard ES index errors on queryables (#812)

This commit is contained in:
Tom Kralidis
2021-11-10 10:11:01 -05:00
committed by GitHub
parent 38cd87285f
commit 8740b23e23
+3
View File
@@ -136,6 +136,9 @@ class ElasticsearchProvider(BaseProvider):
LOGGER.debug('ES index looks generated by GDAL')
self.is_gdal = True
p = ii[self.index_name]['mappings']
except IndexError:
LOGGER.warning('could not get fields; returning empty set')
return {}
for k, v in p['properties'].items():
if 'type' in v: