From 4776011cbc6fbc227aed32070e54e8066f459422 Mon Sep 17 00:00:00 2001 From: RogueRonin Date: Wed, 2 Aug 2017 13:25:46 +0200 Subject: [PATCH] check whether the used filters were really parseable and usable and did not just result in an empty string or dict (#3822) --- frappe/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frappe/client.py b/frappe/client.py index 22da72534e..bc51d4c54f 100644 --- a/frappe/client.py +++ b/frappe/client.py @@ -72,6 +72,11 @@ def get_value(doctype, fieldname, filters=None, as_dict=True, debug=False): fieldname = "name" pass + # check whether the used filters were really parseable and usable + # and did not just result in an empty string or dict + if not filters: + filters = None + return frappe.db.get_value(doctype, filters, fieldname, as_dict=as_dict, debug=debug) @frappe.whitelist()