diff --git a/src/engine/db/handlers/dbWarehouseHandler.java b/src/engine/db/handlers/dbWarehouseHandler.java index a0888b3d..47d97e70 100644 --- a/src/engine/db/handlers/dbWarehouseHandler.java +++ b/src/engine/db/handlers/dbWarehouseHandler.java @@ -202,17 +202,13 @@ public class dbWarehouseHandler extends dbHandlerBase { Logger.error(e); } - // Remove the old workOrder records - - for (WorkOrder workOrder : submitList) - DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder); - // Submit the new workOrders to the ForgeManager for (WorkOrder workOrder : submitList) { + DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder); workOrder.workOrderID = ForgeManager.workOrderCounter.incrementAndGet(); - ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor).add(workOrder); DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder); + ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor).add(workOrder); ForgeManager.forge.add(workOrder); }