Skip to content

Commit

Permalink
fix(hogql): fix schema for empty time-to-convert results (#20944)
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr authored Mar 15, 2024
1 parent 800fddb commit c340790
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/queries/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,7 @@
"additionalProperties": false,
"properties": {
"average_conversion_time": {
"type": "number"
"type": ["number", "null"]
},
"bins": {
"items": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/queries/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ type BinNumber = number
export type FunnelStepsResults = Record<string, any>[]
export type FunnelStepsBreakdownResults = Record<string, any>[][]
export type FunnelTimeToConvertResults = {
average_conversion_time: number
average_conversion_time: number | null
bins: [BinNumber, BinNumber][]
}
export type FunnelTrendsResults = Record<string, any>[]
Expand Down
2 changes: 1 addition & 1 deletion posthog/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class FunnelTimeToConvertResults(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
average_conversion_time: float
average_conversion_time: Optional[float] = None
bins: List[List[int]]


Expand Down

0 comments on commit c340790

Please sign in to comment.