try console.logs
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
964b92e497
commit
e4496cf062
|
@ -16,13 +16,16 @@ describe('zone toggleIsIncluded()', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('should return the created location with isIncluded true', async() => {
|
||||
fit('should return the created location with isIncluded true', async() => {
|
||||
console.log('transaction start');
|
||||
const tx = await models.Zone.beginTransaction({});
|
||||
console.log('transaction ready');
|
||||
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
|
||||
console.log('Zone.toggleIsIncluded start');
|
||||
let result = await models.Zone.toggleIsIncluded(1, 20, true, options);
|
||||
console.log('Zone.toggleIsIncluded ready');
|
||||
|
||||
expect(result.isIncluded).toBeTrue();
|
||||
|
||||
|
|
|
@ -28,15 +28,18 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.toggleIsIncluded = async(id, geoId, isIncluded, options) => {
|
||||
console.log('Zone.toggleIsIncluded entry');
|
||||
|
||||
const models = Self.app.models;
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
if (isIncluded === undefined)
|
||||
if (isIncluded === undefined) {
|
||||
console.log('Zone.toggleIsIncluded destroyAll start');
|
||||
return models.ZoneIncluded.destroyAll({zoneFk: id, geoFk: geoId}, myOptions);
|
||||
else {
|
||||
} else {
|
||||
return models.ZoneIncluded.upsert({
|
||||
zoneFk: id,
|
||||
geoFk: geoId,
|
||||
|
|
Loading…
Reference in New Issue