From c63e55f548587137cff44233dd222b3e60b6eeff Mon Sep 17 00:00:00 2001 From: kimakan <45099849+kimakan@users.noreply.github.com> Date: Wed, 18 Oct 2023 15:49:36 +0200 Subject: [PATCH] fix loop for a changing dict --- daiquiri/files/search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daiquiri/files/search.py b/daiquiri/files/search.py index 5097f90b4..411acb008 100644 --- a/daiquiri/files/search.py +++ b/daiquiri/files/search.py @@ -68,7 +68,8 @@ def build_lunr_index(cls): any_changes = False # clean up files that do not exist anymore - for file_path in Searcher.cms_files: + previous_cms_files = Searcher.cms_files + for file_path in previous_cms_files: if file_path not in unique_files: any_changes = True cls.cms_files.pop(file_path)