fix: initialize link_tables in constructor
This commit is contained in:
parent
507a45d8f2
commit
87ec6d4fb9
2 changed files with 2 additions and 2 deletions
|
|
@ -34,6 +34,7 @@ class DatabaseQuery(object):
|
|||
def __init__(self, doctype, user=None):
|
||||
self.doctype = doctype
|
||||
self.tables = []
|
||||
self.link_tables = []
|
||||
self.conditions = []
|
||||
self.or_conditions = []
|
||||
self.fields = None
|
||||
|
|
@ -131,7 +132,6 @@ class DatabaseQuery(object):
|
|||
self.run = run
|
||||
self.strict = strict
|
||||
self.ignore_ddl = ignore_ddl
|
||||
self.link_tables = []
|
||||
|
||||
# for contextual user permission check
|
||||
# to determine which user permission is applicable on link field of specific doctype
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class TestReportview(unittest.TestCase):
|
|||
|
||||
def test_link_field_syntax(self):
|
||||
todo = frappe.get_doc(
|
||||
doctype="ToDo", description=f"Test ToDo", allocated_to="Administrator"
|
||||
doctype="ToDo", description="Test ToDo", allocated_to="Administrator"
|
||||
).insert()
|
||||
result = frappe.db.get_all(
|
||||
"ToDo",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue