Skip to content

Commit

Permalink
fix(minor): functions must end with bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta committed Mar 29, 2021
1 parent 511a5dd commit 0c99594
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frappe/desk/reportview.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def extract_fieldname(field):
if (fieldname.startswith('count(')
or fieldname.startswith('sum(')
or fieldname.startswith('avg(')):
if not fieldname.endswith(')'):
raise_invalid_field(field)
fieldname = fieldname.split('(', 1)[1].split(')')[0]

return fieldname
Expand Down

0 comments on commit 0c99594

Please sign in to comment.