Skip to content

Commit

Permalink
[Fix] Check if database connexion is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
d3v2a committed Apr 18, 2019
1 parent 6c5e620 commit 32a3394
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 32a3394

Please sign in to comment.