Skip to content

Commit

Permalink
fix: Remove default of -7d for comparefilter
Browse files Browse the repository at this point in the history
This is breaking some of our code and it's also a bad default
  • Loading branch information
rafaeelaudibert committed Dec 13, 2024
1 parent 6a869bb commit 3060585
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion frontend/src/queries/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 0 additions & 1 deletion frontend/src/queries/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion posthog/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3060585

Please sign in to comment.