Skip to content

Commit c100783

Browse files
authored
Sync partiton APIs with collection (#1406)
See also: #1403 Signed-off-by: yangxuan <[email protected]>
1 parent e4340f5 commit c100783

File tree

3 files changed

+163
-221
lines changed

3 files changed

+163
-221
lines changed

pymilvus/client/prepare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def partition_name(cls, collection_name, partition_name):
255255
def batch_insert_param(cls, collection_name, entities, partition_name, fields_info=None, **kwargs):
256256
# insert_request.hash_keys won't be filled in client. It will be filled in proxy.
257257

258-
tag = partition_name or "_default" # should here?
258+
tag = partition_name if isinstance(partition_name, str) else "_default" # should here?
259259
insert_request = milvus_types.InsertRequest(collection_name=collection_name, partition_name=tag)
260260

261261
for entity in entities:

pymilvus/orm/collection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ def __init__(self, name: str, schema: CollectionSchema=None, using: str="default
128128
def __repr__(self):
129129
_dict = {
130130
'name': self.name,
131-
'partitions': self.partitions,
132131
'description': self.description,
133132
'schema': self._schema,
134133
}

0 commit comments

Comments
 (0)