diff --git a/posthog/hogql_queries/lifecycle_query_runner.py b/posthog/hogql_queries/lifecycle_query_runner.py index ac41f76dd45cb..c7bebc76be062 100644 --- a/posthog/hogql_queries/lifecycle_query_runner.py +++ b/posthog/hogql_queries/lifecycle_query_runner.py @@ -85,7 +85,7 @@ def to_persons_query(self) -> ast.SelectQuery | ast.SelectUnionQuery: placeholders={"events_query": self.events_query}, ) - def calculate(self) -> LifecycleQueryResponse: + def calculate(self): response = execute_hogql_query( query_type="LifecycleQuery", query=self.to_query(), diff --git a/posthog/hogql_queries/query_runner.py b/posthog/hogql_queries/query_runner.py index be248fed49c82..ce7a8505d8647 100644 --- a/posthog/hogql_queries/query_runner.py +++ b/posthog/hogql_queries/query_runner.py @@ -60,7 +60,7 @@ def __init__(self, query: InsightQueryNode | Dict[str, Any], team: Team, timings self.team = team self.timings = timings or HogQLTimings() if isinstance(query, self.query_type): - self.query = query + self.query = query # type: ignore else: self.query = self.query_type.model_validate(query) diff --git a/posthog/hogql_queries/test/test_query_runner.py b/posthog/hogql_queries/test/test_query_runner.py index cfa42ad1cb474..e9b6e13b85612 100644 --- a/posthog/hogql_queries/test/test_query_runner.py +++ b/posthog/hogql_queries/test/test_query_runner.py @@ -76,6 +76,8 @@ def test_cache_key(self): def test_cache_key_different_timezone(self): TestQueryRunner = self.setup_test_query_runner_class() team = Team.objects.create(pk=42, organization=self.organization) + team.timezone = "Europe/Vienna" + team.save() runner = TestQueryRunner(query={"some_attr": "bla"}, team=team) # type: ignore