Skip to content

Commit

Permalink
Fix KeyError by handling missing keys in get_public_alias
Browse files Browse the repository at this point in the history
  • Loading branch information
sentry-autofix[bot] authored Mar 29, 2024
1 parent 8aa4997 commit 93f3dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sentry/search/events/builder/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ def get_public_alias(self, function: CurriedFunction) -> str:
ie. any_user_display -> any(user_display)
"""
return self.function_alias_map[function.alias].field
return self.function_alias_map.get(function.alias, function.alias).field

def get_snql_query(self) -> Request:
self.validate_having_clause()
Expand Down

0 comments on commit 93f3dcf

Please sign in to comment.