From 39e1255ebee52ac850e33e8bb7b7e578e5095ee4 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 1 Feb 2022 16:16:54 -0800 Subject: [PATCH] Fix for PostgreSQL DB creation using a database name, #3581 --- db.js | 1 + 1 file changed, 1 insertion(+) diff --git a/db.js b/db.js index 4e7d1e0d..730bb0a5 100644 --- a/db.js +++ b/db.js @@ -680,6 +680,7 @@ module.exports.CreateDB = function (parent, func) { // Postgres SQL var connectinArgs = parent.args.postgres; var dbname = (connectinArgs.database != null) ? connectinArgs.database : 'meshcentral'; + delete connectinArgs.database; obj.databaseType = 6; const pgtools = require('pgtools'); pgtools.createdb(connectinArgs, dbname, function (err, res) {