fix: backTest
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-06-07 07:43:44 +02:00
parent 16ad082967
commit 3805812aba
2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ module.exports = Self => {
try {
let buy = await models.Buy.findOne({where: {entryFk: args.id}}, myOptions);
if (buy)
await buy.updateAttribute('printedStickers', args.printedStickers);
await buy.updateAttribute('printedStickers', args.printedStickers, myOptions);
else {
const userConfig = await models.UserConfig.findById(userId, {fields: ['warehouseFk']}, myOptions);
await Self.rawSql(

View File

@ -4,9 +4,9 @@ describe('entry addFromBuy()', () => {
const ctx = {req: {accessToken: {userId: 18}}};
it('should change the printedStickers of an existent buy', async() => {
const id = 2;
const id = 1;
const item = 1;
const buy = 2;
const buy = 1;
const tx = await models.Entry.beginTransaction({});
const options = {transaction: tx};