Commit bfd94b5
fix: surface IndexError from conversion and pin the response shape
serialize_object() swallows IndexError alongside ValueError and TypeError
into a 404, so an IndexError raised during conversion would report a
corrupt row as a missing one - the failure mode consolidate()'s re-raise
exists to prevent. Widen the caught tuple to match.
Assert the node language the values tuple carries for the conversion does
not leak into the response, on both the converted and passed-through
branches; without the latter a pop placed after the passthrough check
would ship an internal join key to the client.
Correct the comment on the answerless item body: an empty <div /> inside
qti-item-body is XSD-valid, so the empty <p /> is there to give the body
a paragraph to render and edit, not to satisfy the schema.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 2ad5d7b commit bfd94b5
4 files changed
Lines changed: 14 additions & 9 deletions
File tree
- contentcuration/contentcuration
- tests
- utils/qti
- viewsets
- utils/assessment/qti
- viewsets
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
| 159 | + | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
| 1268 | + | |
| 1269 | + | |
1268 | 1270 | | |
1269 | 1271 | | |
1270 | 1272 | | |
| |||
1321 | 1323 | | |
1322 | 1324 | | |
1323 | 1325 | | |
| 1326 | + | |
| 1327 | + | |
1324 | 1328 | | |
1325 | 1329 | | |
1326 | 1330 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
329 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| |||
0 commit comments