From 32a33949c743e05644f59568ce26653698c939db Mon Sep 17 00:00:00 2001 From: dev2a Date: Thu, 18 Apr 2019 21:15:38 +0200 Subject: [PATCH] [Fix] Check if database connexion is defined --- lib/db.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/db.js b/lib/db.js index 25a61c1..e4f654f 100644 --- a/lib/db.js +++ b/lib/db.js @@ -13,8 +13,7 @@ var setAssociation = function setAssociation(modelDef, modelName) { console.debug('associate ' + modelName); } }; - -if (app.config('database')) { +if (app.config('database.connections')) { if (app.config('database.connections.options.logging')) { app.config().set('database.connections.options.logging', console.debug); console.log('query debug');