don't populate settings defaults twice on startup (#7121)

This commit is contained in:
Austin Burdine 2016-07-22 13:01:36 -06:00 committed by Kevin Ansfield
parent f2d09df512
commit 218bc06278
2 changed files with 1 additions and 3 deletions

View File

@ -77,8 +77,6 @@ function init(options) {
forceMigration: process.env.FORCE_MIGRATION
}).then(function () {
config.maintenance.enabled = false;
}).then(function () {
return models.Settings.populateDefaults();
}).catch(function (err) {
errors.logErrorAndExit(err, err.context, err.help);
});

View File

@ -90,7 +90,7 @@ describe('server bootstrap', function () {
forceMigration: undefined
}).should.eql(true);
models.Settings.populateDefaults.callCount.should.eql(2);
models.Settings.populateDefaults.callCount.should.eql(1);
migration.populate.calledOnce.should.eql(false);
config.maintenance.enabled.should.eql(false);