just try returning str for all

This commit is contained in:
wh1te909 2024-03-05 20:45:34 +00:00
parent 986160e667
commit 712e15ba80
1 changed files with 8 additions and 4 deletions

View File

@ -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 = ""