fix: update password encryption keys in Auth table

This commit is contained in:
Shariq Ansari 2025-01-19 17:53:09 +05:30
parent dbaaed7ba3
commit 126d59cfee

View File

@ -9,3 +9,12 @@ def execute():
frappe.flags.ignore_route_conflict_validation = False
frappe.reload_doctype("CRM Twilio Settings", force=True)
if frappe.db.exists("__Auth", {"doctype": "Twilio Settings"}):
Auth = frappe.qb.DocType("__Auth")
result = frappe.qb.from_(Auth).select("*").where(Auth.doctype == "Twilio Settings").run(as_dict=True)
for row in result:
frappe.qb.into(Auth).insert(
"CRM Twilio Settings", "CRM Twilio Settings", row.fieldname, row.password, row.encrypted
).run()