mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 13:41:47 +00:00
refactor: parse native JSON request args in buying/doctype/request_for_quotation/mapper.py
Use frappe.parse_json instead of json.loads so the whitelisted endpoints accept native JSON types (list/dict/bool) in addition to JSON strings.
This commit is contained in:
@@ -57,8 +57,7 @@ def make_supplier_quotation_from_rfq(
|
||||
# This method is used to make supplier quotation from supplier's portal.
|
||||
@frappe.whitelist()
|
||||
def create_supplier_quotation(doc: str | Document | dict):
|
||||
if isinstance(doc, str):
|
||||
doc = json.loads(doc)
|
||||
doc = frappe.parse_json(doc)
|
||||
|
||||
if frappe.session.user not in frappe.get_all(
|
||||
"Portal User", {"parent": doc.get("supplier")}, pluck="user"
|
||||
|
||||
Reference in New Issue
Block a user