Browse Source

ref: django 3.x compat: get_group_by_cols must have alias=None param (#52647)

<!-- Describe your PR here. -->

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
anthony sottile 1 year ago
parent
commit
42b4e20dd8
2 changed files with 1 additions and 2 deletions
  1. 0 1
      pyproject.toml
  2. 1 1
      src/sentry/rules/history/backends/postgres.py

+ 0 - 1
pyproject.toml

@@ -798,7 +798,6 @@ module = [
     "sentry.rules.conditions.tagged_event",
     "sentry.rules.filters.assigned_to",
     "sentry.rules.filters.latest_release",
-    "sentry.rules.history.backends.postgres",
     "sentry.rules.history.endpoints.project_rule_group_history",
     "sentry.rules.history.endpoints.project_rule_stats",
     "sentry.rules.history.preview",

+ 1 - 1
src/sentry/rules/history/backends/postgres.py

@@ -36,7 +36,7 @@ def convert_results(results: Sequence[_Result]) -> Sequence[RuleGroupHistory]:
 # temporary hack for removing unnecessary subqueries from group by list
 # TODO: remove when upgrade to django 3.0
 class NoGroupBySubquery(Subquery):
-    def get_group_by_cols(self) -> List[str]:
+    def get_group_by_cols(self, alias=None) -> List:
         return []