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:
Ankush Menat 2025-05-02 12:00:36 +05:30
parent 23ffdc87ae
commit e0f63a928f

View file

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