mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
fix: ensure type on method parameter
(cherry picked from commit c055e86e51)
This commit is contained in:
@@ -545,6 +545,9 @@ def make_payment_request(**args):
|
|||||||
if args.dt not in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST:
|
if args.dt not in ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST:
|
||||||
frappe.throw(_("Payment Requests cannot be created against: {0}").format(frappe.bold(args.dt)))
|
frappe.throw(_("Payment Requests cannot be created against: {0}").format(frappe.bold(args.dt)))
|
||||||
|
|
||||||
|
if args.dn and not isinstance(args.dn, str):
|
||||||
|
frappe.throw(_("Invalid parameter. 'dn' should be of type str"))
|
||||||
|
|
||||||
ref_doc = args.ref_doc or frappe.get_doc(args.dt, args.dn)
|
ref_doc = args.ref_doc or frappe.get_doc(args.dt, args.dn)
|
||||||
if not args.get("company"):
|
if not args.get("company"):
|
||||||
args.company = ref_doc.company
|
args.company = ref_doc.company
|
||||||
|
|||||||
Reference in New Issue
Block a user