232201_test_to_master #1582
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue