Commit a5eb9dd
Fix KeyError in HyperDatabase when checking parentID in articleIndex
Add __contains__ method to DumbBTree class to properly handle 'in'
operator checks. Previously, when parentID was 0 (or any value not
in the index), Python would fall back to __getitem__ which raised
KeyError. Now __contains__ returns False for missing keys instead
of raising an exception.1 parent c4070cc commit a5eb9dd
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
0 commit comments