mirror of
https://github.com/clearml/clearml
synced 2025-03-04 02:57:24 +00:00
Fix None
values get casted to empty strings when connecting a dictionary
This commit is contained in:
parent
a2b3f1cf3b
commit
341aba2cee
@ -115,6 +115,9 @@ def convert_bool(s):
|
|||||||
|
|
||||||
def cast_basic_type(value, type_str):
|
def cast_basic_type(value, type_str):
|
||||||
if not type_str:
|
if not type_str:
|
||||||
|
# empty string with no type is treated as None
|
||||||
|
if value == "":
|
||||||
|
return None
|
||||||
return value
|
return value
|
||||||
|
|
||||||
basic_types = {str(getattr(v, '__name__', v)): v for v in (float, int, str, list, tuple, dict)}
|
basic_types = {str(getattr(v, '__name__', v)): v for v in (float, int, str, list, tuple, dict)}
|
||||||
|
Loading…
Reference in New Issue
Block a user