Commit 13e11b6
Avoid z_score numeric exception for conversion rates >1 (#503)
At normal operation, it's not possible for an experiment
to have a `participant_count` > `completed_count`.
However, by manually using `increment_participation`
(for a custom use-case or by accident) you can arrive
on such a situation.
If that happens, `Zscore.calculate` produces an error that
propagates all the way up to the web view.
Solution:
In the cornercase of a conversion rates taking a value >1,
it makes no sense to calculate a zscore value at all.
An escape clause was added1 parent 87fbd83 commit 13e11b6
2 files changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
276 | 288 | | |
277 | 289 | | |
278 | 290 | | |
| |||
0 commit comments