Merge pull request #12831 from rohitwaghchaure/fixed-user-type-for-select-perm

fix: patch travis
This commit is contained in:
rohitwaghchaure 2021-04-12 15:17:47 +05:30 committed by GitHub
commit 96c3bfe511
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,10 +121,10 @@ class UserType(Document):
self.prepare_select_perm_doctypes(doc, user_doctypes, select_doctypes)
for child_table in doc.get_table_fields():
if frappe.db.table_exists(child_table.options):
if (frappe.db.table_exists(child_table.options)
and not frappe.get_cached_value('DocType', child_table.options, 'istable')):
child_doc = frappe.get_meta(child_table.options)
if not child_doc.istable:
self.prepare_select_perm_doctypes(child_doc, user_doctypes, select_doctypes)
self.prepare_select_perm_doctypes(child_doc, user_doctypes, select_doctypes)
if select_doctypes:
select_doctypes = set(select_doctypes)