mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix: Qb query, use isin instead of in and access fields without dot notation due to reserved pypika keywords
This commit is contained in:
@@ -28,10 +28,10 @@ def execute():
|
|||||||
query = (
|
query = (
|
||||||
frappe.qb.from_(singles)
|
frappe.qb.from_(singles)
|
||||||
.select(
|
.select(
|
||||||
singles.field, singles.value
|
singles["field"], singles.value
|
||||||
).where(
|
).where(
|
||||||
(singles.doctype == doctype)
|
(singles.doctype == doctype)
|
||||||
& (singles.field in fields)
|
& (singles["field"].isin(fields))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
data = query.run(as_dict=True)
|
data = query.run(as_dict=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user