Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ceorourke committed Jul 15, 2024
1 parent cdceb22 commit 0be28cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sentry/rules/conditions/event_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def batch_query_hook(
if len(group) == 3:
organization_id = group[3]

if error_issue_ids:
if error_issue_ids and organization_id:
error_sums = self.get_chunked_result(
tsdb_function=self.tsdb.get_sums,
model=get_issue_tsdb_group_model(GroupCategory.ERROR),
Expand All @@ -440,7 +440,7 @@ def batch_query_hook(
)
batch_sums.update(error_sums)

if generic_issue_ids:
if generic_issue_ids and organization_id:
generic_sums = self.get_chunked_result(
tsdb_function=self.tsdb.get_sums,
# this isn't necessarily performance, just any non-error category
Expand Down

0 comments on commit 0be28cf

Please sign in to comment.