diff --git a/posthog/hogql_queries/utils/query_previous_period_date_range.py b/posthog/hogql_queries/utils/query_previous_period_date_range.py index e4aa8b9e1368ae..df1ef53d4e0692 100644 --- a/posthog/hogql_queries/utils/query_previous_period_date_range.py +++ b/posthog/hogql_queries/utils/query_previous_period_date_range.py @@ -3,7 +3,7 @@ from posthog.hogql_queries.utils.query_date_range import QueryDateRange from posthog.models.team import Team -from posthog.schema import InsightDateRange, IntervalType +from posthog.schema import DateRange, InsightDateRange, IntervalType from posthog.utils import ( get_compare_period_dates, relative_date_parse_with_delta_mapping, @@ -15,13 +15,13 @@ class QueryPreviousPeriodDateRange(QueryDateRange): """Translation of the raw `date_from` and `date_to` filter values to datetimes.""" _team: Team - _date_range: Optional[InsightDateRange] + _date_range: Optional[InsightDateRange | DateRange] _interval: Optional[IntervalType] _now_without_timezone: datetime def __init__( self, - date_range: Optional[InsightDateRange], + date_range: Optional[InsightDateRange | DateRange], team: Team, interval: Optional[IntervalType], now: datetime,