소스 검색

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



불러오는 중...
취소
저장