From 5b5927221cc30a729902b739f1ffe0200e7868e0 Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Tue, 14 May 2024 20:35:28 +0800 Subject: [PATCH] fix: Revert of dup cherry-pick #1949 (#2088) Signed-off-by: yangxuan --- pymilvus/orm/schema.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pymilvus/orm/schema.py b/pymilvus/orm/schema.py index 5314c6e4e..3d90c0d82 100644 --- a/pymilvus/orm/schema.py +++ b/pymilvus/orm/schema.py @@ -277,14 +277,12 @@ def enable_dynamic_field(self, value: bool): self._enable_dynamic_field = bool(value) def to_dict(self): - _dict = { + return { "auto_id": self.auto_id, "description": self._description, "fields": [s.to_dict() for s in self._fields], + "enable_dynamic_field": self.enable_dynamic_field, } - if self._enable_dynamic_field is not None: - _dict["enable_dynamic_field"] = self._enable_dynamic_field - return _dict def verify(self): # final check, detect obvious problems