just try returning str for all
This commit is contained in:
parent
986160e667
commit
712e15ba80
|
@ -403,13 +403,17 @@ def replace_arg_db_values(
|
|||
elif value is True or value is False:
|
||||
return format_shell_bool(value, shell)
|
||||
|
||||
# for primary keys and float fields (like boot_time)
|
||||
elif isinstance(value, int) or isinstance(value, float):
|
||||
return str(value)
|
||||
|
||||
elif isinstance(value, dict):
|
||||
return json.dumps(value)
|
||||
|
||||
# return str for everything else
|
||||
try:
|
||||
ret = str(value)
|
||||
except Exception:
|
||||
ret = ""
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def format_shell_array(value: list[str]) -> str:
|
||||
temp_string = ""
|
||||
|
|
Loading…
Reference in New Issue