Просмотр исходного кода

add condition to loadAllConfig

utsushiiro 7 лет назад
Родитель
Сommit
cafb6bad70
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/server/models/config.js

+ 2 - 1
src/server/models/config.js

@@ -274,7 +274,8 @@ module.exports = function(crowi) {
       , config = {};
     config.crowi = {}; // crowi namespace
 
-    Config.find()
+    // ignore documents that from_env is false or does not exist
+    Config.find({$or: [{from_env: false}, {from_env: {$exists: false}}]})
       .sort({ns: 1, key: 1})
       .exec(function(err, doc) {