perf: 优化 metadata 类型添加 float

pull/8746/head
Jiangjie.Bai 2022-08-15 16:02:40 +08:00 committed by Jiangjie.Bai
parent ddf4b61c9f
commit 9a4b32cb3c
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ class SimpleMetadataWithFilters(SimpleMetadata):
default = getattr(field, 'default', None)
if default is not None and default != empty:
if isinstance(default, (str, int, bool, datetime.datetime, list)):
if isinstance(default, (str, int, bool, float, datetime.datetime, list)):
field_info['default'] = default
for attr in self.attrs: