[fix] filter can_import with can_create, fixes frappe/erpnext#6966
This commit is contained in:
parent
863f16050a
commit
1f8f1ef2dc
1 changed files with 2 additions and 2 deletions
|
|
@ -149,8 +149,8 @@ class UserPermissions:
|
|||
self.can_read.remove(dt)
|
||||
|
||||
if "System Manager" in self.roles:
|
||||
self.can_import = frappe.db.sql_list("""select name from `tabDocType`
|
||||
where allow_import = 1""")
|
||||
self.can_import = filter(lambda d: d in self.can_create, frappe.db.sql_list("""select name from `tabDocType`
|
||||
where allow_import = 1"""))
|
||||
|
||||
def get_defaults(self):
|
||||
import frappe.defaults
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue