Skip to content

Commit 8d1b5b4

Browse files
authored
Merge pull request #1526 from someones/fix_es_get_query_mappings
[ElasticSearch] Fix for #1521
2 parents e586f99 + 9d36d39 commit 8d1b5b4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

redash/query_runner/elasticsearch.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,13 @@ def _get_mappings(self, url):
119119
return mappings, error
120120

121121
def _get_query_mappings(self, url):
122-
mappings, error = self._get_mappings(url)
122+
mappings_data, error = self._get_mappings(url)
123123
if error:
124-
return mappings, error
124+
return mappings_data, error
125125

126-
for index_name in mappings:
127-
index_mappings = mappings[index_name]
126+
mappings = {}
127+
for index_name in mappings_data:
128+
index_mappings = mappings_data[index_name]
128129
for m in index_mappings.get("mappings", {}):
129130
for property_name in index_mappings["mappings"][m]["properties"]:
130131
property_data = index_mappings["mappings"][m]["properties"][property_name]

0 commit comments

Comments
 (0)