From 8df1dfa29a20b53058cbbb87d9ccecac5b0963e6 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 18 May 2016 17:38:29 +0530 Subject: [PATCH] [fixes] exclude double quotes while creating event conditions --- frappe/desk/calendar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/desk/calendar.py b/frappe/desk/calendar.py index 0ba81be0b6..fa01b3f8de 100644 --- a/frappe/desk/calendar.py +++ b/frappe/desk/calendar.py @@ -29,6 +29,6 @@ def get_event_conditions(doctype, filters=None): filters = json.loads(filters) for key in filters: if filters[key]: - conditions += " and " + key + ' = "' + filters[key].replace('"', '\"') + '"' + conditions += 'and `{0}` = "{1}"'.format(frappe.db.escape(key), frappe.db.escape(filters[key])) return conditions