mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-04-22 13:49:45 +08:00
fix: Check collection exists before drop it. (#17692)
Co-authored-by: wlleiiwang <wlleiiwang@tencent.com>
This commit is contained in:
parent
abfcd9d3b6
commit
f148f1efa2
@ -279,7 +279,10 @@ class TencentVector(BaseVector):
|
|||||||
return docs
|
return docs
|
||||||
|
|
||||||
def delete(self) -> None:
|
def delete(self) -> None:
|
||||||
self._client.drop_collection(database_name=self._client_config.database, collection_name=self.collection_name)
|
if self._has_collection():
|
||||||
|
self._client.drop_collection(
|
||||||
|
database_name=self._client_config.database, collection_name=self.collection_name
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class TencentVectorFactory(AbstractVectorFactory):
|
class TencentVectorFactory(AbstractVectorFactory):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user