File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/sentry/sentry_metrics/querying Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ def _parse_query(self) -> Optional[Sequence[Condition]]:
163
163
key:value (_ key:value)?
164
164
in which the only supported operator is AND until this logic is switched to the metrics layer.
165
165
"""
166
- if self ._query is None :
166
+ if not self ._query :
167
167
return None
168
168
169
169
# TODO: implement parsing via the discover grammar.
@@ -172,16 +172,13 @@ def _parse_query(self) -> Optional[Sequence[Condition]]:
172
172
for key , value in matches :
173
173
filters .append (Condition (lhs = Column (name = key ), op = Op .EQ , rhs = value ))
174
174
175
- if not self ._query :
176
- raise InvalidMetricsQueryError ("Error while parsing the query." )
177
-
178
175
return filters
179
176
180
177
def _parse_group_bys (self ) -> Optional [Sequence [Column ]]:
181
178
"""
182
179
Parses the group bys by converting them into a list of snuba columns.
183
180
"""
184
- if self ._group_bys is None :
181
+ if not self ._group_bys :
185
182
return None
186
183
187
184
return [Column (group_by ) for group_by in self ._group_bys ]
You can’t perform that action at this time.
0 commit comments