try
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
08ac3ab0a1
commit
dd16633b53
|
@ -25,7 +25,7 @@ describe('zone toggleIsIncluded()', () => {
|
|||
try {
|
||||
const options = {transaction: tx};
|
||||
log('Zone.toggleIsIncluded start');
|
||||
let result = models.Zone.toggleIsIncluded(1, 20, true, options);
|
||||
let result = await models.Zone.toggleIsIncluded(1, 20, true, options);
|
||||
log('Zone.toggleIsIncluded finish');
|
||||
|
||||
expect(result.isIncluded).toBeTrue();
|
||||
|
|
|
@ -35,17 +35,19 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
if (typeof options == 'object') {
|
||||
log(`Don't use new transacction`);
|
||||
Object.assign(myOptions, options);
|
||||
}
|
||||
|
||||
let data;
|
||||
if (isIncluded === undefined) {
|
||||
log('Zone.toggleIsIncluded destroyAll start');
|
||||
data = models.ZoneIncluded.destroyAll({zoneFk: id, geoFk: geoId}, myOptions);
|
||||
data = await models.ZoneIncluded.destroyAll({zoneFk: id, geoFk: geoId}, myOptions);
|
||||
} else {
|
||||
log('Zone.toggleIsIncluded upsert start');
|
||||
|
||||
data = models.ZoneIncluded.upsert({
|
||||
data = await models.ZoneIncluded.upsert({
|
||||
zoneFk: id,
|
||||
geoFk: geoId,
|
||||
isIncluded: isIncluded
|
||||
|
|
Loading…
Reference in New Issue