4091-dms_clean #1028

Merged
carlosjr merged 6 commits from 4091-dms_clean into dev 2022-07-22 13:58:27 +00:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit 5491fce0c6 - Show all commits

View File

@ -1,3 +1,4 @@
const UserError = require('vn-loopback/util/user-error');
const fs = require('fs-extra');
const path = require('path');
@ -26,6 +27,9 @@ module.exports = Self => {
myOptions.transaction = tx;
try {
if (process.env.NODE_ENV == 'test')
throw new UserError(`Action not allowed on the test environment`);
const models = Self.app.models;
const DmsContainer = models.DmsContainer;