refs #4823 Bug fixes
This commit is contained in:
parent
e4461e255d
commit
9b2f7d12ab
|
@ -19,14 +19,14 @@ console.log(chalk.hex('#06c581')(
|
|||
`
|
||||
))
|
||||
|
||||
let sequelize, conSpinner
|
||||
let sequelize, spinner;
|
||||
try {
|
||||
conSpinner = ora('Creating database connection...').start();
|
||||
spinner = ora('Creating database connection...').start();
|
||||
sequelize = createConn();
|
||||
await checkCon();
|
||||
conSpinner.succeed();
|
||||
spinner.succeed();
|
||||
} catch (err) {
|
||||
conSpinner.fail();
|
||||
spinner.fail();
|
||||
criticalError(err);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,6 @@ try {
|
|||
criticalError(err);
|
||||
}
|
||||
|
||||
let spinner;
|
||||
try {
|
||||
const action = JSON.parse(env.FORCE_SYNC) ? { force: true } : { alter: true };
|
||||
const actionMsg = JSON.parse(env.FORCE_SYNC) ? 'Forcing' : 'Altering';
|
||||
|
|
2
utils.js
2
utils.js
|
@ -449,7 +449,7 @@ export async function insertSupplyLine(supplyLine) {
|
|||
try {
|
||||
// Check if the warehouse exists, and if it doesn't, create it
|
||||
let warehouse = await models.warehouse.findOne({
|
||||
where: { warehouseId: object.warehouseId }
|
||||
where: { warehouseId: supplyLine.warehouseId }
|
||||
});
|
||||
if (!warehouse) {
|
||||
let warehouse = (await vnRequest('GET', `${env.API_URL}/warehouses/${supplyLine.warehouseId}`, null, null, spinner)).data;
|
||||
|
|
Loading…
Reference in New Issue