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

__iexact reduce call has default value now. #45206

Merged
merged 3 commits into from
Feb 28, 2023
Merged

Conversation

corps
Copy link
Contributor

@corps corps commented Feb 28, 2023

Addresses https://sentry.my.sentry.io/organizations/sentry/issues/392893/?project=2 by allowing empty values arrays and letting django orm resolve to a falsey Q. Interestingly, there doesn't seem to be a consistent safe way to do this other than create a Q that will always be false incidentally.

@corps corps requested review from markstory and a team February 28, 2023 20:03
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 28, 2023
@@ -170,8 +170,10 @@ def in_iexact(column: str, values: Any) -> Q:
from operator import or_

query = f"{column}__iexact"
# if values is empty, have a default value for the reduce call that will essentially resolve a colum in []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# if values is empty, have a default value for the reduce call that will essentially resolve a colum in []
# if values is empty, have a default value for the reduce call that will essentially resolve a column in []

@corps corps enabled auto-merge (squash) February 28, 2023 20:16
@corps corps merged commit afccdda into master Feb 28, 2023
@corps corps deleted the zc/iniexact_reduce_base_value branch February 28, 2023 20:40
jan-auer added a commit that referenced this pull request Mar 1, 2023
* master: (37 commits)
  ref(ppf): Don't use --commit-batch-size for futures queue length (#45182)
  feat(codecov-v2): Add more logging (#45225)
  fix(alerts): Center table items on alert history page (#45226)
  feat(CapMan): Pass `tenant_ids` to Snuba (#44788)
  ref(db): Drop `project_id` from Environment (model state) (#45207)
  chore(profiling): Rename context in profiles task (#45208)
  feat(replays): Improve index page query performance (#45098)
  chore(issue assignment): Add logging for`GroupOwner` auto assignment (#45142)
  fix(hybrid-cloud): Uncache organization when queueing it for deletion (#45213)
  fix(perf): Navigating to Transaction Summary from Trends widget should persist custom date selection (#45190)
  fix(pageFilter): Fix overflow (#45169)
  ref(git hooks): Only suggest autoupdate variable when pulling if not already set (#45179)
  fix(dashboard): Include dashboard filters in widget viewer (#45106)
  fix(alerts): Remove null projects from alerts list (#45202)
  feat(replay): Update Inline replay onboarding img to support dark mode (#45084)
  __iexact reduce call has default value now. (#45206)
  feat(replay): Use SDK value for LCP (#44868)
  chore(hybrid-cloud): breaking foreign keys (#45203)
  Revert "ref(db): Drop `project_id` from Environment (model state) (#45094)"
  ref(db): Drop `project_id` from Environment (model state) (#45094)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants