fix: Push aggregate_on_field to field list
- for proper extraction of child table
This commit is contained in:
parent
d7edd05a5d
commit
14ae20bdb8
1 changed files with 2 additions and 0 deletions
|
|
@ -127,6 +127,8 @@ def setup_group_by(data):
|
|||
|
||||
if frappe.db.has_column(data.aggregate_on_doctype, data.aggregate_on_field):
|
||||
data.fields.append('{aggregate_function}(`tab{aggregate_on_doctype}`.`{aggregate_on_field}`) AS _aggregate_column'.format(**data))
|
||||
if data.aggregate_on_field:
|
||||
data.fields.append("`tab{aggregate_on_doctype}`.`{aggregate_on_field}`".format(**data))
|
||||
else:
|
||||
raise_invalid_field(data.aggregate_on_field)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue