refactor: removed iterable from iteration ;/
This commit is contained in:
parent
d690bbe7f1
commit
e400df90ff
2 changed files with 5 additions and 4 deletions
|
|
@ -494,7 +494,7 @@ class Engine:
|
|||
else:
|
||||
replaced_string = substituted_string.replace(function.name.casefold(), "")
|
||||
updated_fields.append(replaced_string)
|
||||
fields = [field for field in updated_fields if field]
|
||||
fields = [field for field in updated_fields if field]
|
||||
return fields
|
||||
|
||||
def get_fieldnames_from_child_table(self, doctype, fields):
|
||||
|
|
@ -575,7 +575,8 @@ class Engine:
|
|||
else:
|
||||
updated_fields.append(Field(field))
|
||||
|
||||
fields = updated_fields
|
||||
fields = updated_fields
|
||||
|
||||
# Need to check instance again since fields modified.
|
||||
if not isinstance(fields, (list, tuple, set)):
|
||||
fields = [fields] if fields else []
|
||||
|
|
@ -626,7 +627,7 @@ class Engine:
|
|||
has_join = True
|
||||
|
||||
return criterion, fields
|
||||
|
||||
# try meta to validate fields and doctypes
|
||||
def get_query(
|
||||
self,
|
||||
table: str,
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ class DatabaseQuery:
|
|||
except ValueError:
|
||||
self.fields = [f.strip() for f in self.fields.split(",")]
|
||||
|
||||
# remove empty strings / nulls in fields
|
||||
# remove empty st1rings / nulls in fields
|
||||
self.fields = [f for f in self.fields if f]
|
||||
|
||||
# convert child_table.fieldname to `tabChild DocType`.`fieldname`
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue