Skip to content

Commit

Permalink
Fixes #371
Browse files Browse the repository at this point in the history
  • Loading branch information
royrusso committed Apr 16, 2018
1 parent e178beb commit d6f5748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elastichq/service/IndicesService.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def get_indices_summary(self, cluster_name, indices_names=None):

index_state = state_indices.get(key)
index['settings'] = {
'number_of_shards': int(jmespath.search("settings.index.number_of_shards", index_state)),
"number_of_replicas": int(jmespath.search("settings.index.number_of_replicas", index_state))}
'number_of_shards': int(jmespath.search("settings.index.number_of_shards", index_state) or 0),
"number_of_replicas": int(jmespath.search("settings.index.number_of_replicas", index_state) or 0)}
index['state'] = index_state.get("state", None)
indices.append(index)
return sorted(indices, key=lambda k: k['index_name'])
Expand Down

0 comments on commit d6f5748

Please sign in to comment.