mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-23 20:16:40 +00:00
refactor: parse native JSON request args in accounts/doctype/purchase_invoice/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:
@@ -50,8 +50,7 @@ def make_purchase_receipt(
|
|||||||
):
|
):
|
||||||
if args is None:
|
if args is None:
|
||||||
args = {}
|
args = {}
|
||||||
if isinstance(args, str):
|
args = frappe.parse_json(args)
|
||||||
args = json.loads(args)
|
|
||||||
|
|
||||||
def post_parent_process(source_parent, target_parent):
|
def post_parent_process(source_parent, target_parent):
|
||||||
remove_items_with_zero_qty(target_parent)
|
remove_items_with_zero_qty(target_parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user