From 517e3ab22f43660170f905aedc505e5e1c61ab89 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Sun, 21 Nov 2021 03:02:27 -0500 Subject: [PATCH] fix(install): error with fresh database --- src/controllers/install.js | 2 +- src/settings/defaults.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/install.js b/src/controllers/install.js index 60e2b5e18..8c939c9ab 100644 --- a/src/controllers/install.js +++ b/src/controllers/install.js @@ -181,7 +181,7 @@ installController.install = function (req, res) { SettingsSchema.create( { name: 'es:enable', - value: eEnabled + value: typeof eEnabled === 'undefined' ? false : eEnabled }, done ) diff --git a/src/settings/defaults.js b/src/settings/defaults.js index cb9394d42..343af5459 100644 --- a/src/settings/defaults.js +++ b/src/settings/defaults.js @@ -516,7 +516,7 @@ function checkPriorities (callback) { ) } -function addedDefaultPrioritesToTicketTypes (callback) { +function addedDefaultPrioritiesToTicketTypes (callback) { async.waterfall( [ function (next) { @@ -700,7 +700,7 @@ settingsDefaults.init = function (callback) { return ticketPriorityDefaults(done) }, function (done) { - return addedDefaultPrioritesToTicketTypes(done) + return addedDefaultPrioritiesToTicketTypes(done) }, function (done) { return checkPriorities(done)