Commit 66c8d34
committed
fix(app): allow fractional charging wattage on smartphones
Pydantic rejects records like Apple iPhone XS Max (7.5 W wireless) and
LG G2 (4.5 W wireless) because the schema/model declared
`charging_wired_w` and `charging_wireless_w` as `int`. Industry specs
routinely use fractional watts (5 / 7.5 / 10 / 15 W Qi, 4.5 W early
LG), so widen both fields to `float | None`.
Fixes the `int_from_float` failure that took down test, deploy-pages,
and refresh-data on f510014.
Refs #11 parent f510014 commit 66c8d34
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments