fix: avoid bad default of flt on string types
🤦 this whole thing needs a refactor, fixing all bugs first to
ensure we don't screw up something in process
This commit is contained in:
parent
23ffdc87ae
commit
e0f63a928f
1 changed files with 8 additions and 0 deletions
|
|
@ -889,6 +889,14 @@ from {tables}
|
|||
value = f.value
|
||||
fallback = "''"
|
||||
|
||||
elif (
|
||||
df
|
||||
and (db_type := cstr(frappe.db.type_map.get(df.fieldtype, " ")[0]))
|
||||
and db_type in ("varchar", "text", "longtext", "smalltext", "json")
|
||||
):
|
||||
value = cstr(f.value)
|
||||
fallback = "''"
|
||||
|
||||
else:
|
||||
value = flt(f.value)
|
||||
fallback = 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue