From 64aa1b49cf1914fb20ec4ee9f1745b1440fdd844 Mon Sep 17 00:00:00 2001 From: Olga Bulat Date: Tue, 12 Dec 2023 06:50:09 +0300 Subject: [PATCH] Fix the cache condition Signed-off-by: Olga Bulat --- api/api/controllers/search_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api/controllers/search_controller.py b/api/api/controllers/search_controller.py index ac18488d097..f84cfc27254 100644 --- a/api/api/controllers/search_controller.py +++ b/api/api/controllers/search_controller.py @@ -570,7 +570,7 @@ def get_sources(index): if isinstance(sources, list) or cache_fetch_failed: # Invalidate old provider format. cache.delete(key=source_cache_name) - if not sources or sources: + if not sources: # Don't increase `size` without reading this issue first: # https://github.com/elastic/elasticsearch/issues/18838 size = 100