fix(query): allow AggregateFunction as well in apply_field_permissions

Without this `fields=[{"COUNT": "name"}]` didn't work, although fields=[{"COUNT": "NAME"}] did.

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-11-11 22:12:01 +05:30
parent 1d2a73f659
commit 8e03924356
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -973,7 +973,7 @@ class Engine:
elif hasattr(field, "alias") and field.alias and field.name in permitted_fields_set:
allowed_fields.append(field)
elif isinstance(field, PseudoColumnMapper):
elif isinstance(field, AggregateFunction | PseudoColumnMapper):
# Typically functions or complex terms
allowed_fields.append(field)