Skip to content

Commit d588bc4

Browse files
committed
Fix getting refenrece folder dirnames that belongs to static documents
1 parent fc5ecc9 commit d588bc4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/chatbot-index/src/modules/add_missing_static_docs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
folders_to_remove.append(ref_folder)
6161

6262
if index:
63-
VECTOR_INDEX.refresh_index_static_docs(index, static_docs_to_add, [])
64-
VECTOR_INDEX.remove_docs_in_folder(index, folders_to_remove)
63+
if static_docs_to_add:
64+
VECTOR_INDEX.refresh_index_static_docs(index, static_docs_to_add, [])
65+
if folders_to_remove:
66+
for folder_to_remove in folders_to_remove:
67+
VECTOR_INDEX.remove_docs_in_folder(index, folder_to_remove)
6568
LOGGER.info("Static docs refresh process completed.")

0 commit comments

Comments
 (0)