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

@@ -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()