mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 00:55:02 +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 = (
|
||||
frappe.qb.from_(singles)
|
||||
.select(
|
||||
singles.field, singles.value
|
||||
singles["field"], singles.value
|
||||
).where(
|
||||
(singles.doctype == doctype)
|
||||
& (singles.field in fields)
|
||||
& (singles["field"].isin(fields))
|
||||
)
|
||||
)
|
||||
data = query.run(as_dict=True)
|
||||
|
||||
Reference in New Issue
Block a user