Fix strictQuery warning from new mongoose versions
-Suppress the "DeprecationWarning: Mongoose: the `strictQuery` option will be switched back to `false` by default in Mongoose 7" warning msg when starting the explorer and using any of the scripts that connect to mongo
This commit is contained in:
@@ -359,6 +359,8 @@ if (lib.is_locked([database]) == false) {
|
||||
dbString = dbString + ':' + settings.dbsettings.port;
|
||||
dbString = dbString + '/' + settings.dbsettings.database;
|
||||
|
||||
mongoose.set('strictQuery', true);
|
||||
|
||||
mongoose.connect(dbString, function(err) {
|
||||
if (err) {
|
||||
console.log('Error: Unable to connect to database: %s', dbString);
|
||||
|
||||
Reference in New Issue
Block a user