Skip to content

Commit

Permalink
Fix bug: add enable_dynamic_field in result of DescribeCollection (#1949
Browse files Browse the repository at this point in the history
)

Signed-off-by: zhenshan.cao <[email protected]>
  • Loading branch information
czs007 authored Mar 5, 2024
1 parent 8494ad4 commit 5b5e361
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pymilvus/client/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ def dict(self):
"consistency_level": self.consistency_level,
"properties": self.properties,
"num_partitions": self.num_partitions,
"enable_dynamic_field": self.enable_dynamic_field,
}
if self.enable_dynamic_field:
_dict["enable_dynamic_field"] = self.enable_dynamic_field
self._rewrite_schema_dict(_dict)
return _dict

Expand Down
2 changes: 1 addition & 1 deletion pymilvus/orm/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def to_dict(self):
"description": self._description,
"fields": [s.to_dict() for s in self._fields],
}
if self._enable_dynamic_field:
if self._enable_dynamic_field is not None:
_dict["enable_dynamic_field"] = self._enable_dynamic_field
return _dict

Expand Down

0 comments on commit 5b5e361

Please sign in to comment.