Fix None values get casted to empty strings when connecting a dictionary

This commit is contained in:
allegroai 2022-12-22 22:09:19 +02:00
parent a2b3f1cf3b
commit 341aba2cee

View File

@ -115,6 +115,9 @@ def convert_bool(s):
def cast_basic_type(value, type_str):
if not type_str:
# empty string with no type is treated as None
if value == "":
return None
return value
basic_types = {str(getattr(v, '__name__', v)): v for v in (float, int, str, list, tuple, dict)}