fix(minor): functions must end with bracket

This commit is contained in:
Rushabh Mehta 2021-03-29 22:04:04 +05:30
parent 511a5ddc4b
commit 0c995940c1

View file

@ -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