Skip to content

ref: match signature of Func.as_sql #74952

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

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/sentry/event_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,15 @@ def __int__(self):
# This is used within create_or_update and friends
return self.group.get_score() if self.group else 0

def as_sql(self, compiler, connection, function=None, template=None):
def as_sql(
self,
compiler,
connection,
function=None,
template=None,
arg_joiner: str | None = None,
**extra_context,
) -> tuple[str, list[str | int]]:
has_values = self.last_seen is not None and self.times_seen is not None
if has_values:
sql = "log(times_seen + %d) * 600 + %d" % (
Expand Down
Loading