Merge pull request #17265 from deepeshgarg007/migration_failures

fix: Migration failures for version-13 to develop
This commit is contained in:
mergify[bot] 2022-06-29 10:28:09 +00:00 committed by GitHub
commit a905a3d755
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 16 deletions

View file

@ -1298,7 +1298,7 @@ def validate_fields(meta):
frappe.throw(_("Is Published Field must be a valid fieldname"), InvalidFieldNameError)
def check_website_search_field(meta):
if not meta.website_search_field:
if not meta.get("website_search_field"):
return
if meta.website_search_field not in fieldname_list:

View file

@ -121,7 +121,7 @@ execute:frappe.delete_doc_if_exists('DocType', 'GCalendar Settings')
frappe.patches.v12_0.remove_example_email_thread_notify
execute:from frappe.desk.page.setup_wizard.install_fixtures import update_genders;update_genders()
frappe.patches.v12_0.set_correct_url_in_files
execute:frappe.reload_doc('core', 'doctype', 'doctype')
execute:frappe.reload_doc('core', 'doctype', 'doctype') #2022-06-21
execute:frappe.reload_doc('custom', 'doctype', 'property_setter')
frappe.patches.v13_0.remove_invalid_options_for_data_fields
frappe.patches.v13_0.website_theme_custom_scss
@ -190,7 +190,6 @@ frappe.patches.v14_0.transform_todo_schema
frappe.patches.v14_0.remove_post_and_post_comment
frappe.patches.v14_0.reset_creation_datetime
frappe.patches.v14_0.remove_is_first_startup
frappe.patches.v14_0.reload_workspace_child_tables
frappe.patches.v14_0.clear_long_pending_stale_logs
frappe.patches.v14_0.log_settings_migration

View file

@ -1,13 +0,0 @@
import frappe
def execute():
child_tables = frappe.get_all(
"DocField",
pluck="options",
filters={"fieldtype": ["in", frappe.model.table_fields], "parent": "Workspace"},
)
for child_table in child_tables:
if child_table != "Has Role":
frappe.reload_doc("desk", "doctype", child_table, force=True)

View file

@ -7,6 +7,16 @@ from frappe import _
def execute():
frappe.reload_doc("desk", "doctype", "workspace", force=True)
child_tables = frappe.get_all(
"DocField",
pluck="options",
filters={"fieldtype": ["in", frappe.model.table_fields], "parent": "Workspace"},
)
for child_table in child_tables:
if child_table != "Has Role":
frappe.reload_doc("desk", "doctype", child_table, force=True)
for seq, workspace in enumerate(frappe.get_all("Workspace", order_by="name asc")):
doc = frappe.get_doc("Workspace", workspace.name)
content = create_content(doc)