fix: handle aggregate columns
This commit is contained in:
parent
965b992a22
commit
d144afac64
1 changed files with 6 additions and 1 deletions
|
|
@ -440,12 +440,17 @@ def append_totals_row(data):
|
|||
|
||||
def get_field_info(fields, doctype):
|
||||
"""Get column names, labels, field types, and translatable properties based on column names."""
|
||||
|
||||
field_info = []
|
||||
for key in fields:
|
||||
df = None
|
||||
try:
|
||||
parenttype, fieldname = parse_field(key)
|
||||
except ValueError:
|
||||
continue
|
||||
# handles aggregate functions
|
||||
parenttype = doctype
|
||||
fieldname = key.split("(", 1)[0]
|
||||
fieldname = fieldname[0].upper() + fieldname[1:]
|
||||
|
||||
parenttype = parenttype or doctype
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue