fix: deepsource
This commit is contained in:
parent
0f5e7fa055
commit
9cc39377fe
2 changed files with 4 additions and 6 deletions
|
|
@ -303,7 +303,6 @@ class TestDocType(unittest.TestCase):
|
|||
#create doctype
|
||||
link_doc = self.new_doctype('Test Linked Doctype')
|
||||
link_doc.is_submittable = 1
|
||||
field_1 = link_doc.append('fields', {})
|
||||
for data in link_doc.get('permissions'):
|
||||
data.submit = 1
|
||||
data.cancel = 1
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ def get_submitted_linked_docs(doctype, name, docs=None):
|
|||
name (str) - The docname for which get all linked doctypes
|
||||
|
||||
Keyword Arguments:
|
||||
docs (list of dict) - (Optional) Get list of dictionary for linked doctype (default: None)
|
||||
docs (list of dict) - (Optional) Get list of dictionary for linked doctype.
|
||||
|
||||
Returns:
|
||||
dict - Return list of documents and link count
|
||||
|
|
@ -108,9 +108,7 @@ def validate_linked_doc(docinfo):
|
|||
|
||||
|
||||
def get_exempted_doctypes():
|
||||
"""
|
||||
Get list of doctypes exempted from being auto-cancelled
|
||||
"""
|
||||
""" Get list of doctypes exempted from being auto-cancelled """
|
||||
|
||||
auto_cancel_exempt_doctypes = []
|
||||
for doctypes in frappe.get_hooks('auto_cancel_exempt_doctypes'):
|
||||
|
|
@ -291,7 +289,8 @@ def get_dynamic_linked_fields(doctype, without_ignore_user_permissions_enabled=F
|
|||
if is_single(df.doctype): continue
|
||||
|
||||
# optimized to get both link exists and parenttype
|
||||
possible_link = frappe.get_all(df.doctype, filters={df.doctype_fieldname: doctype}, fields=['parenttype'], distinct=True)
|
||||
possible_link = frappe.get_all(df.doctype, filters={df.doctype_fieldname: doctype},
|
||||
fields=['parenttype'], distinct=True)
|
||||
|
||||
if not possible_link: continue
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue