Commit 10a4d68
refactor(datasets): count the same id field the insert binds
Drop the fall back to item.id() when datasetItemId is null. It looked
defensive but was worse than nothing: the INSERT ten lines below binds
item.datasetItemId().toString() with no null check, so a null cannot
survive to be counted either way, and every caller normalizes
datasetItemId before reaching here. All the fallback added was a second,
divergent definition of item identity in the one place that must agree
with what the INSERT writes.
Addresses review feedback on #7966.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent c37e5c6 commit 10a4d68
1 file changed
Lines changed: 4 additions & 3 deletions
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3502 | 3502 | | |
3503 | 3503 | | |
3504 | 3504 | | |
3505 | | - | |
3506 | | - | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
3507 | 3508 | | |
3508 | | - | |
| 3509 | + | |
3509 | 3510 | | |
3510 | 3511 | | |
3511 | 3512 | | |
| |||
0 commit comments