From 1c5e7bd06eb385a43fab9b6384bdf143be6526f9 Mon Sep 17 00:00:00 2001 From: Cai Zhang Date: Tue, 31 Oct 2023 17:09:08 +0800 Subject: [PATCH] Convert the result to python basic types to enable json dumps Signed-off-by: Cai Zhang --- pymilvus/client/abstract.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pymilvus/client/abstract.py b/pymilvus/client/abstract.py index cea25ca7e..ea7ff9566 100644 --- a/pymilvus/client/abstract.py +++ b/pymilvus/client/abstract.py @@ -161,7 +161,7 @@ def __init__(self, raw: Any): def __pack(self, raw: Any): self.collection_name = raw.schema.name self.description = raw.schema.description - self.aliases = raw.aliases + self.aliases = list(raw.aliases) self.collection_id = raw.collectionID self.num_shards = raw.shards_num self.num_partitions = raw.num_partitions @@ -184,7 +184,8 @@ def __pack(self, raw: Any): # for s in raw.statistics: - self.properties = raw.properties + for p in raw.properties: + self.properties[p.key] = p.value @classmethod def _rewrite_schema_dict(cls, schema_dict: Dict):