Bläddra i källkod

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 år sedan
committed by GitHub
förälder
incheckning
8f27a36e76
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. +1
    -1
      payments/templates/pages/razorpay_checkout.py

+ 1
- 1
payments/templates/pages/razorpay_checkout.py Visa fil

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



Laddar…
Avbryt
Spara