This commit is contained in:
Barış Soner Uşaklı
2018-10-16 20:27:14 -04:00
parent 154d7076d9
commit 0aebb9caf8
2 changed files with 6 additions and 4 deletions

View File

@@ -52,7 +52,9 @@ postgresModule.getConnectionOptions = function () {
if (!nconf.get('postgres:port')) {
nconf.set('postgres:port', 5432);
}
if (!nconf.get('postgres:database')) {
const dbName = nconf.get('postgres:database');
if (dbName === undefined || dbName === '') {
winston.warn('You have no database name, using "nodebb"');
nconf.set('postgres:database', 'nodebb');
}