Update frappe/desk/reportview.py
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
(cherry picked from commit 375cdea145)
This commit is contained in:
parent
aa6288a265
commit
8203ab6ff7
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ def setup_group_by(data):
|
|||
'''Add columns for aggregated values e.g. count(name)'''
|
||||
if data.group_by:
|
||||
if data.aggregate_function.lower() not in ('count', 'sum', 'avg'):
|
||||
frappe.throw('Invalid aggregate function')
|
||||
frappe.throw(_('Invalid aggregate function'))
|
||||
if '`' in data.aggregate_on:
|
||||
raise_invalid_field(data.aggregate_on)
|
||||
data.fields.append('{aggregate_function}(`tab{doctype}`.`{aggregate_on}`) AS _aggregate_column'.format(**data))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue