From a73a9c73108db853ef5635e13925ecd95c965d92 Mon Sep 17 00:00:00 2001 From: Leo Benkel Date: Sat, 6 Jul 2024 23:20:41 +0200 Subject: [PATCH] Remove the tracestack when the collection already exists --- backend/apps/rag/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/apps/rag/main.py b/backend/apps/rag/main.py index 7c6974535..b2e08553b 100644 --- a/backend/apps/rag/main.py +++ b/backend/apps/rag/main.py @@ -978,10 +978,11 @@ def store_docs_in_vector_db(docs, collection_name, overwrite: bool = False) -> b return True except Exception as e: - log.exception(e) if e.__class__.__name__ == "UniqueConstraintError": return True + log.exception(e) + return False