Merge pull request #20578 from sunnyakaxd/patch-3

fix: Syntax error in `get_child_warehouses`
This commit is contained in:
rohitwaghchaure 2020-02-13 10:08:32 +05:30 committed by GitHub
commit a7423ecb45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,7 +180,7 @@ def get_child_warehouses(warehouse):
lft, rgt = frappe.get_cached_value("Warehouse", warehouse, [lft, rgt])
return frappe.db.sql_list("""select name from `tabWarehouse`
where lft >= %s and rgt =< %s""", (lft, rgt))
where lft >= %s and rgt <= %s""", (lft, rgt))
def get_warehouses_based_on_account(account, company=None):
warehouses = []
@ -199,4 +199,4 @@ def get_warehouses_based_on_account(account, company=None):
frappe.throw(_("Warehouse not found against the account {0}")
.format(account))
return warehouses
return warehouses