232201_test_to_master #1582

Merged
alexm merged 126 commits from 232201_test_to_master into master 2023-06-01 06:16:49 +00:00
1 changed files with 2 additions and 3 deletions
Showing only changes of commit 8cf988b7d2 - Show all commits

View File

@ -25,9 +25,8 @@ module.exports = Self => {
const isProduction = await models.VnUser.hasRole(userId, 'production', myOptions);
const isAdministrative = await models.VnUser.hasRole(userId, 'administrative', myOptions);
const where = (isProduction || isAdministrative) ? undefined : {alertLevel: 0};
filter = mergeFilters(filter, {where});
if (!isProduction && !isAdministrative)
filter = mergeFilters(filter, {where: {alertLevel: 0}});
const states = await models.State.find(filter, myOptions);