From 3060585a5901a3548548e8d6391c8044ab4e3fa0 Mon Sep 17 00:00:00 2001 From: Rafa Audibert Date: Fri, 13 Dec 2024 13:58:54 -0300 Subject: [PATCH] fix: Remove default of -7d for comparefilter This is breaking some of our code and it's also a bad default --- frontend/src/queries/schema.json | 1 - frontend/src/queries/schema.ts | 1 - posthog/schema.py | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json index 10593d4622b20..e1b812e44e0e9 100644 --- a/frontend/src/queries/schema.json +++ b/frontend/src/queries/schema.json @@ -3792,7 +3792,6 @@ "type": "boolean" }, "compare_to": { - "default": "-7d", "description": "The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 hours ago.", "type": "string" } diff --git a/frontend/src/queries/schema.ts b/frontend/src/queries/schema.ts index b7b9369fc060a..0041753c3815e 100644 --- a/frontend/src/queries/schema.ts +++ b/frontend/src/queries/schema.ts @@ -1180,7 +1180,6 @@ export interface CompareFilter { /** * The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 hours ago. - * @default -7d */ compare_to?: string } diff --git a/posthog/schema.py b/posthog/schema.py index c4aa9af4c060e..4dffd661f9895 100644 --- a/posthog/schema.py +++ b/posthog/schema.py @@ -526,7 +526,7 @@ class CompareFilter(BaseModel): default=False, description="Whether to compare the current date range to a previous date range." ) compare_to: Optional[str] = Field( - default="-7d", + default=None, description=( "The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1" " year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30"