mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
fix: update delete brain logic (#1619)
This commit is contained in:
parent
6bc9dd1894
commit
5e61445fb2
@ -107,7 +107,8 @@ class Knowledges(Repository):
|
||||
if knowledge.file_name:
|
||||
knowledge_to_delete_list.append(f"{brain_id}/{knowledge.file_name}")
|
||||
|
||||
self.db.storage.from_("quivr").remove(knowledge_to_delete_list)
|
||||
if knowledge_to_delete_list:
|
||||
self.db.storage.from_("quivr").remove(knowledge_to_delete_list)
|
||||
|
||||
self.db.from_("knowledge").delete().filter(
|
||||
"brain_id", "eq", str(brain_id)
|
||||
|
Loading…
Reference in New Issue
Block a user