Fix: init memory size from es (#12282)

### What problem does this PR solve?

Handle return when none exist index.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Lynn
2025-12-29 12:01:45 +08:00
committed by GitHub
parent 01f0ced1e6
commit f9619defcc
2 changed files with 10 additions and 11 deletions

View File

@ -130,7 +130,7 @@ class ESConnection(ESConnectionBase):
exist_index_list = [idx for idx in index_names if self.index_exist(idx)]
if not exist_index_list:
return None
return None, 0
bool_query = Q("bool", must=[], must_not=[])
if hide_forgotten: