Skip to content

Commit 84aba70

Browse files
authoredJan 26, 2017
Merge pull request #1545 from hgs847825/master
[ElasticSearch] Fix: query fails when properties key is missing
2 parents a5d7351 + 3b4e306 commit 84aba70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎redash/query_runner/elasticsearch.py

+2
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ def _get_query_mappings(self, url):
127127
for index_name in mappings_data:
128128
index_mappings = mappings_data[index_name]
129129
for m in index_mappings.get("mappings", {}):
130+
if "properties" not in index_mappings["mappings"][m]:
131+
continue
130132
for property_name in index_mappings["mappings"][m]["properties"]:
131133
property_data = index_mappings["mappings"][m]["properties"][property_name]
132134
if property_name not in mappings:

0 commit comments

Comments
 (0)
Please sign in to comment.