[fix] patch

This commit is contained in:
Rushabh Mehta 2017-01-12 16:29:23 +05:30 committed by Nabin Hait
parent d3d957c10a
commit 4ac1863027

View file

@ -2,11 +2,14 @@ import frappe
def execute():
frappe.reload_doc('custom', 'doctype', 'custom_field', force=True)
try:
frappe.db.sql('update `tabCustom Field` set in_standard_filter = in_filter_dash')
except Exception, e:
if e.args[0]!=1054: raise e
for doctype in frappe.get_all("DocType", {"istable": 0, "issingle": 0}):
frappe.reload_doctype(doctype.name, force=True)
for doctype in frappe.get_all("DocType", {"istable": 0, "issingle": 0, "custom": 0}):
try:
frappe.reload_doctype(doctype.name, force=True)
except KeyError:
pass