fix(materials): if no machine stop the check and fail so it manual needs tried again
This commit is contained in:
@@ -20,6 +20,12 @@ export const isMainMatStaged = async (lot: any) => {
|
|||||||
const machine = data.data.filter(
|
const machine = data.data.filter(
|
||||||
(m: any) => m.HumanReadableId === lot.machineID,
|
(m: any) => m.HumanReadableId === lot.machineID,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// just in case we encounter an issue with the machines
|
||||||
|
if (machine.length === 0) {
|
||||||
|
createLog("error", "mainMaterial", "ocp", "Invalid machine passed over.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// we have a check on ksc side to ignore the tetra machine for now as its not updating in 2.0
|
// we have a check on ksc side to ignore the tetra machine for now as its not updating in 2.0
|
||||||
if (!machine[0].StagingMainMaterialMandatory) {
|
if (!machine[0].StagingMainMaterialMandatory) {
|
||||||
createLog(
|
createLog(
|
||||||
|
|||||||
Reference in New Issue
Block a user