浏览代码

check whether the used filters were really parseable and usable and did not just result in an empty string or dict (#3822)

version-14
RogueRonin 8 年前
committed by Rushabh Mehta
父节点
当前提交
4776011cbc
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      frappe/client.py

+ 5
- 0
frappe/client.py 查看文件

@@ -72,6 +72,11 @@ def get_value(doctype, fieldname, filters=None, as_dict=True, debug=False):
fieldname = "name" fieldname = "name"
pass 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) return frappe.db.get_value(doctype, filters, fieldname, as_dict=as_dict, debug=debug)


@frappe.whitelist() @frappe.whitelist()


正在加载...
取消
保存