-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix(notifications): Fix parameters and add tests for participants and subscriptions #57053
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -584,7 +588,9 @@ def _get_subscriptions( | |||
project_ids=project_ids, | |||
type=NotificationSettingEnum.WORKFLOW, | |||
) | |||
query_groups = {group for group in groups if (enabled_settings[group.project_id][1])} | |||
query_groups = { | |||
group for group in groups if (not enabled_settings[group.project_id][2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snigdhas can we use something other than a tuple to make it more obvious what the 2nd parameter is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really - the response from notification_service needs to be json serializable. We can re-map it to SubscriptionStatus like we do below, but it's not necessarily cleaner here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snigdhas can we do a dictionary then instead of a tuple?
) == {self.project.id: (False, True)} | ||
) == { | ||
self.project.id: GroupSubscriptionStatus( | ||
is_disabled=False, is_active=True, has_only_inactive_subscriptions=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snigdhas passing kwargs is so much better, thank you
Fixes SENTRY-1662
Fixes SENTRY-1663