Merge pull request #10017 from marination/contacts-patch-fix
fix: Migrate fails on `move_email_and_phone_to_child_table` patch
This commit is contained in:
commit
ad8403034c
1 changed files with 4 additions and 4 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
frappe.reload_doc("contacts", "doctype", "contact_email")
|
||||||
|
frappe.reload_doc("contacts", "doctype", "contact_phone")
|
||||||
|
frappe.reload_doc("contacts", "doctype", "contact")
|
||||||
|
|
||||||
contact_details = frappe.db.sql("""
|
contact_details = frappe.db.sql("""
|
||||||
SELECT
|
SELECT
|
||||||
`name`, `email_id`, `phone`, `mobile_no`, `modified_by`, `creation`, `modified`
|
`name`, `email_id`, `phone`, `mobile_no`, `modified_by`, `creation`, `modified`
|
||||||
|
|
@ -10,10 +14,6 @@ def execute():
|
||||||
and `tabContact Email`.email_id=`tabContact`.email_id)
|
and `tabContact Email`.email_id=`tabContact`.email_id)
|
||||||
""", as_dict=True)
|
""", as_dict=True)
|
||||||
|
|
||||||
frappe.reload_doc("contacts", "doctype", "contact_email")
|
|
||||||
frappe.reload_doc("contacts", "doctype", "contact_phone")
|
|
||||||
frappe.reload_doc("contacts", "doctype", "contact")
|
|
||||||
|
|
||||||
email_values = []
|
email_values = []
|
||||||
phone_values = []
|
phone_values = []
|
||||||
for count, contact_detail in enumerate(contact_details):
|
for count, contact_detail in enumerate(contact_details):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue