Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: remove unreachable code from _handle_numeric_filter #87359

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/sentry/api/event_search.py
Original file line number Diff line number Diff line change
@@ -795,14 +795,11 @@ def _handle_basic_filter(self, search_key, operator, search_value):
def _handle_numeric_filter(self, search_key, operator, search_value):
operator = get_operator_value(operator)

if self.is_numeric_key(search_key.name):
try:
search_value = SearchValue(parse_numeric_value(*search_value))
except InvalidQuery as exc:
raise InvalidSearchQuery(str(exc))
return SearchFilter(search_key, operator, search_value)

return self._handle_text_filter(search_key, operator, SearchValue("".join(search_value)))
try:
search_value = SearchValue(parse_numeric_value(*search_value))
except InvalidQuery as exc:
raise InvalidSearchQuery(str(exc))
return SearchFilter(search_key, operator, search_value)

def visit_date_filter(self, node, children):
(search_key, _, operator, search_value) = children