fix(fe): read batchApply as a sibling of results, not a child
onPhotosReady read results.batchApply, but on the measure capture state batchApply is a SIBLING of results, so the read was always undefined and every batch photo fell through to processedBlob: undefined. The Photos-ready lineup showed all four PNGs (calibration, overlay, and both batch siblings) yet only two images reached Woo, because publish.py selects WHERE processed_blob IS NOT NULL. Read s.capture.batchApply.
This commit is contained in:
@@ -119,11 +119,12 @@
|
|||||||
})
|
})
|
||||||
: draft();
|
: draft();
|
||||||
// The session already produced the processed PNGs: the calibration
|
// The session already produced the processed PNGs: the calibration
|
||||||
// inventory PNG in results.inventoryPng and each sibling's in
|
// inventory PNG in results.inventoryPng, and each sibling's in
|
||||||
// results.batchApply (parallel to s.batch). Attach them as
|
// batchApply (a sibling of results on the measure state, parallel to
|
||||||
// processedBlob so the server upload carries real images (PUBLISH-40).
|
// s.batch). Attach them as processedBlob so the server upload carries
|
||||||
|
// real images (PUBLISH-40).
|
||||||
const calIdx = s.calibrationIndex;
|
const calIdx = s.calibrationIndex;
|
||||||
const apply = results?.batchApply;
|
const apply = s.capture.k === 'measure' ? s.capture.batchApply : null;
|
||||||
// slab_photos.id is a global primary key, so the id must be unique
|
// slab_photos.id is a global primary key, so the id must be unique
|
||||||
// across slabs - key it on the slab id, not just the index/size.
|
// across slabs - key it on the slab id, not just the index/size.
|
||||||
const photos = s.batch.map((source, i) => ({
|
const photos = s.batch.map((source, i) => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user