feat(tracemetrics): Bypass metric field validation for equations #112479
+36
−3
@sentry/warden / warden: sentry-backend-bugs
completed
Apr 8, 2026 in 1m 8s
1 issue
sentry-backend-bugs: Found 1 issue (1 medium)
Medium
TypeError when iterating over None aggregateField - `src/sentry/explore/endpoints/serializers.py:230`
When aggregateField is explicitly None (allowed by allow_null=True on line 115), q.get("aggregateField", []) returns None instead of []. The generator expression then attempts to iterate over None, raising TypeError: 'NoneType' object is not iterable. This will cause a 500 error when saving explore queries with aggregateField: null on the metrics dataset.
Duration: 1m 5s · Tokens: 125.7k in / 2.9k out · Cost: $0.35 (+extraction: $0.00, +fix_gate: $0.00)
Annotations
Check warning on line 230 in src/sentry/explore/endpoints/serializers.py
sentry-warden / warden: sentry-backend-bugs
TypeError when iterating over None aggregateField
When `aggregateField` is explicitly `None` (allowed by `allow_null=True` on line 115), `q.get("aggregateField", [])` returns `None` instead of `[]`. The generator expression then attempts to iterate over `None`, raising `TypeError: 'NoneType' object is not iterable`. This will cause a 500 error when saving explore queries with `aggregateField: null` on the metrics dataset.
Loading