From 4ed9927a304fa88d89c8eaaea2810eb61ee3956e Mon Sep 17 00:00:00 2001 From: David Arnold Date: Sat, 11 Nov 2023 15:07:23 +0100 Subject: [PATCH] fix(patch): to migrate properly in post section (#38045) --- .../patches/v15_0/migrate_payment_request_status.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/erpnext/patches/v15_0/migrate_payment_request_status.py b/erpnext/patches/v15_0/migrate_payment_request_status.py index 746a67bced..9f0de56621 100644 --- a/erpnext/patches/v15_0/migrate_payment_request_status.py +++ b/erpnext/patches/v15_0/migrate_payment_request_status.py @@ -7,9 +7,7 @@ def execute(): Change Inward Payment Requests from statut 'Initiated' to correct status 'Requested'. Status 'Initiated' is reserved for Outward Payment Requests and was a semantic error in previour versions. """ - - if frappe.reload_doc("accounts", "doctype", "Payment Request"): - so = frappe.qb.DocType("Payment Request") - frappe.qb.update(so).set(so.status, "Requested").where( - so.payment_request_type == "Inward" - ).where(so.status == "Initiated").run() + so = frappe.qb.DocType("Payment Request") + frappe.qb.update(so).set(so.status, "Requested").where(so.payment_request_type == "Inward").where( + so.status == "Initiated" + ).run()