Commit b289b56
committed
Reject bool where a plain int is expected in _is_valid
bool is a subclass of int, so isinstance(True, int) is True and _is_valid
accepted a bool wherever a bare int was expected (e.g. query limit/offset/
autocut), silently coercing True/False to 1/0 instead of raising
WeaviateInvalidInputError. Guard the int case, mirroring the bool/int fix in
config.py from #2077. Adds a validator unit-test case.1 parent 17a9887 commit b289b56
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
0 commit comments