Minor fixes

This commit is contained in:
Nabin Hait
2016-09-04 10:31:41 +05:30
parent 36830016ee
commit 8693b5c93a
6 changed files with 23 additions and 17 deletions

View File

@@ -17,7 +17,8 @@ def get_filters_cond(doctype, filters, conditions):
if isinstance(f[1], basestring) and f[1][0] == '!':
flt.append([doctype, f[0], '!=', f[1][1:]])
else:
flt.append([doctype, f[0], '=', f[1]])
value = frappe.db.escape(f[1]) if isinstance(f[1], basestring) else f[1]
flt.append([doctype, f[0], '=', value])
query = DatabaseQuery(doctype)
query.filters = flt