Pārlūkot izejas kodu

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 pirms 8 gadiem
committed by Rushabh Mehta
vecāks
revīzija
4776011cbc
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. +5
    -0
      frappe/client.py

+ 5
- 0
frappe/client.py Parādīt failu

@@ -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()


Notiek ielāde…
Atcelt
Saglabāt