fix: replaced return_query with run
This commit is contained in:
parent
33775b5373
commit
672ae5cd87
2 changed files with 2 additions and 2 deletions
|
|
@ -122,7 +122,7 @@ class TestServerScript(unittest.TestCase):
|
|||
self.assertEqual(frappe.get_doc('Server Script', 'test_return_value').execute_method(), 'hello')
|
||||
|
||||
def test_permission_query(self):
|
||||
self.assertTrue('where (1 = 1)' in frappe.db.get_list('ToDo', return_query=1))
|
||||
self.assertTrue('where (1 = 1)' in frappe.db.get_list('ToDo', run=False))
|
||||
self.assertTrue(isinstance(frappe.db.get_list('ToDo'), list))
|
||||
|
||||
def test_attribute_error(self):
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ def get_group_by_count(doctype, current_filters, field):
|
|||
current_filters = frappe.parse_json(current_filters)
|
||||
subquery_condition = ''
|
||||
|
||||
subquery = frappe.get_all(doctype, filters=current_filters, return_query = True)
|
||||
subquery = frappe.get_all(doctype, filters=current_filters, run=False)
|
||||
if field == 'assigned_to':
|
||||
subquery_condition = ' and `tabToDo`.reference_name in ({subquery})'.format(subquery = subquery)
|
||||
return frappe.db.sql("""select `tabToDo`.owner as name, count(*) as count
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue