fix: ordered fields on get_list returning list (#25663)
* fix: ordered `fields` on get_list returning list * chore: linters
This commit is contained in:
parent
b0da61413c
commit
6e02df7ea2
1 changed files with 2 additions and 0 deletions
|
|
@ -133,6 +133,8 @@ class DatabaseQuery:
|
|||
limit_page_length = page_length
|
||||
if limit:
|
||||
limit_page_length = limit
|
||||
if as_list and not isinstance(self.fields, (list | tuple)) and len(self.fields) > 1:
|
||||
frappe.throw(_("Fields must be a list or tuple when as_list is enabled"))
|
||||
|
||||
self.filters = filters or []
|
||||
self.or_filters = or_filters or []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue