From 72f44be1f9ecbac16bef3ccd36b2ed83176db3b9 Mon Sep 17 00:00:00 2001 From: "zhenshan.cao" Date: Tue, 6 Feb 2024 11:51:18 +0800 Subject: [PATCH] Fix several bugs related to MilvusClient (#1923) Signed-off-by: zhenshan.cao --- pymilvus/client/grpc_handler.py | 4 +++- pymilvus/milvus_client/milvus_client.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index b731677ab..26797500c 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -898,7 +898,9 @@ def describe_alias(self, alias: str, timeout: Optional[float] = None, **kwargs): @retry_on_rpc_failure() def list_aliases(self, collection_name: str, timeout: Optional[float] = None, **kwargs): - check_pass_param(collection_name=collection_name, timeout=timeout) + check_pass_param(timeout=timeout) + if collection_name: + check_pass_param(collection_name=collection_name) request = Prepare.list_aliases_request(collection_name, kwargs.get("db_name", "")) rf = self._stub.ListAliases.future(request, timeout=timeout) response = rf.result() diff --git a/pymilvus/milvus_client/milvus_client.py b/pymilvus/milvus_client/milvus_client.py index 550829799..cfcf5a9c6 100644 --- a/pymilvus/milvus_client/milvus_client.py +++ b/pymilvus/milvus_client/milvus_client.py @@ -828,7 +828,7 @@ def get_partition_stats( result = {stat.key: stat.value for stat in ret} if "row_count" in result: result["row_count"] = int(result["row_count"]) - return + return result def create_user(self, user_name: str, password: str, timeout: Optional[float] = None, **kwargs): conn = self._get_connection()