Merge pull request #5108 from neilLasrado/expense-querry
Fixed bug in get expense query
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index eb16ac5..b94b3eb 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -362,6 +362,6 @@
{condition} {match_condition}"""
.format(condition=condition, key=frappe.db.escape(searchfield),
match_condition=get_match_cond(doctype)), {
- 'company': filters['company'],
+ 'company': filters.get("company", ""),
'txt': "%%%s%%" % frappe.db.escape(txt)
})
\ No newline at end of file