Skip to content

Commit d6f5748

Browse files
committed
Fixes #371
1 parent e178beb commit d6f5748

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

elastichq/service/IndicesService.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ def get_indices_summary(self, cluster_name, indices_names=None):
112112

113113
index_state = state_indices.get(key)
114114
index['settings'] = {
115-
'number_of_shards': int(jmespath.search("settings.index.number_of_shards", index_state)),
116-
"number_of_replicas": int(jmespath.search("settings.index.number_of_replicas", index_state))}
115+
'number_of_shards': int(jmespath.search("settings.index.number_of_shards", index_state) or 0),
116+
"number_of_replicas": int(jmespath.search("settings.index.number_of_replicas", index_state) or 0)}
117117
index['state'] = index_state.get("state", None)
118118
indices.append(index)
119119
return sorted(indices, key=lambda k: k['index_name'])

0 commit comments

Comments
 (0)