fix(patch): drop_column_apply_user_permissions
This commit is contained in:
parent
6c12448554
commit
9f3a55da89
1 changed files with 3 additions and 2 deletions
|
|
@ -6,8 +6,9 @@ def execute():
|
|||
to_remove = ['DocPerm', 'Custom DocPerm']
|
||||
|
||||
for doctype in to_remove:
|
||||
if column in frappe.db.get_table_columns(doctype):
|
||||
frappe.db.sql("alter table `tab{0}` drop column {1}".format(doctype, column))
|
||||
if frappe.db.table_exists(doctype):
|
||||
if column in frappe.db.get_table_columns(doctype):
|
||||
frappe.db.sql("alter table `tab{0}` drop column {1}".format(doctype, column))
|
||||
|
||||
frappe.reload_doc('core', 'doctype', 'docperm', force=True)
|
||||
frappe.reload_doc('core', 'doctype', 'custom_docperm', force=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue