fix: backTest
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
16ad082967
commit
3805812aba
|
@ -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(
|
||||
|
|
|
@ -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};
|
||||
|
|
Loading…
Reference in New Issue