Revert "fix(qb-pg): Type cast boolean params as int"
This reverts commit 06183535af.
This commit is contained in:
parent
8db6bf48f6
commit
1a8ff7275d
1 changed files with 1 additions and 11 deletions
|
|
@ -89,17 +89,7 @@ def patch_query_execute():
|
|||
pass
|
||||
else:
|
||||
raise frappe.PermissionError("Only SELECT SQL allowed in scripting")
|
||||
params = param_collector.get_parameters()
|
||||
|
||||
# wrap boolean values as integer since we save Check as smallint and pg doesn't
|
||||
# like boolean values in place of ints and frappe doesn't support Boolean types
|
||||
# explicitly.
|
||||
if frappe.conf.db_type == "postgres":
|
||||
for k, v in params.items():
|
||||
if isinstance(v, bool):
|
||||
params[k] = int(v)
|
||||
|
||||
return query, params
|
||||
return query, param_collector.get_parameters()
|
||||
|
||||
query_class = get_attr(str(frappe.qb).split("'")[1])
|
||||
builder_class = get_type_hints(query_class._builder).get("return")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue