Closed ctgraham closed 4 years ago
The tray barcode is also replaced with the book barcode in an error with the validation phase.
This line is far too trusting: https://github.com/ulsdevteam/lcsu/blob/957941ab851acc89c4fe9d4c75a3dd572d5b78ba/src/Controller/TraysController.php#L184 This same code is used in validation and in initial scan.
This line should simply validate, not push new data into the tray. https://github.com/ulsdevteam/lcsu/blob/957941ab851acc89c4fe9d4c75a3dd572d5b78ba/src/Template/Trays/scan_end.ctp#L13
This appears to be mostly resolved by https://github.com/ulsdevteam/lcsu/commit/75f732e07e8efd3a5a6f6b89d2d97407cdef2a74, pending a fix for: https://github.com/ulsdevteam/lcsu/commit/75f732e07e8efd3a5a6f6b89d2d97407cdef2a74#r35238489
book barcode yields an error message as expected.
Scanned a book barcode after scanning counted books into a tray, then scanning the next book barcode directed to /trays/scan-init rather than presenting a error.
This also updated the tray barcode with the book barcode.