Browse Source

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 years ago
committed by GitHub
parent
commit
8f27a36e76
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      payments/templates/pages/razorpay_checkout.py

+ 1
- 1
payments/templates/pages/razorpay_checkout.py View File

@@ -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…
Cancel
Save