mirror of https://github.com/jumpserver/jumpserver
perf: 优化 metadata 类型添加 float
parent
ddf4b61c9f
commit
9a4b32cb3c
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue