refactor: patch partner_website for old data

(cherry picked from commit 8db29b0a81)

# Conflicts:
#	erpnext/patches.txt
This commit is contained in:
ruthra kumar
2026-01-22 12:04:37 +05:30
parent 91043de352
commit ce695ebdd0
2 changed files with 11 additions and 0 deletions

View File

@@ -462,3 +462,4 @@ erpnext.patches.v15_0.create_accounting_dimensions_in_advance_taxes_and_charges
erpnext.patches.v16_0.set_ordered_qty_in_quotation_item
erpnext.patches.v16_0.migrate_transaction_deletion_task_flags_to_status # 2
erpnext.patches.v16_0.update_company_custom_field_in_bin
erpnext.patches.v15_0.replace_http_with_https_in_sales_partner

View File

@@ -0,0 +1,10 @@
import frappe
from frappe import qb
from pypika.functions import Replace
def execute():
sp = frappe.qb.DocType("Sales Partner")
qb.update(sp).set(sp.partner_website, Replace(sp.partner_website, "http://", "https://")).where(
sp.partner_website.rlike("^http://.*")
).run()