Skip to content

Commit aa91835

Browse files
authored
fix(hybridcloud) Don't capture valid notification queries as errors (#51379)
Remove the assert that was trying enforce user/team conditions. The logic used in deletions removes all notifications for a project which is valid query. Fixes SENTRY-11C0
1 parent 799b107 commit aa91835

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/sentry/notifications/manager.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
Union,
1414
)
1515

16-
import sentry_sdk
1716
from django.db import transaction
1817
from django.db.models import Q, QuerySet
1918

@@ -222,14 +221,6 @@ def _filter(
222221
team_ids: Iterable[int] | None = None,
223222
) -> QuerySet:
224223
"""Wrapper for .filter that translates types to actual attributes to column types."""
225-
226-
try:
227-
assert (user_ids and not team_ids) or (
228-
team_ids and not user_ids
229-
), "Must have user_id or team_id when reading settings"
230-
except AssertionError as err:
231-
sentry_sdk.capture_exception(err)
232-
233224
query = Q()
234225
if provider:
235226
query = query & Q(provider=provider.value)

0 commit comments

Comments
 (0)