瀏覽代碼

fix: db.get_value -> db.get_single_value (#17531)

db.get_value for singles returns string type always, this is confusing
behaviour, db.get_single_value should be used instead.

semgrep rule: https://github.com/frappe/semgrep-rules/pull/16
pull/2/head
Ankush Menat 2 年之前
committed by GitHub
父節點
當前提交
8f27a36e76
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      payments/templates/pages/razorpay_checkout.py

+ 1
- 1
payments/templates/pages/razorpay_checkout.py 查看文件

@@ -51,7 +51,7 @@ def get_context(context):


def get_api_key():
api_key = frappe.db.get_value("Razorpay Settings", None, "api_key")
api_key = frappe.db.get_single_value("Razorpay Settings", "api_key")
if cint(frappe.form_dict.get("use_sandbox")):
api_key = frappe.conf.sandbox_api_key



Loading…
取消
儲存