Преглед на файлове

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



Зареждане…
Отказ
Запис